hw4mdl-svn Mailing List for Wimba Moodle Integration
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-11-12 20:46:51
|
Revision: 266 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=266&view=rev Author: trollinger Date: 2008-11-12 20:46:50 +0000 (Wed, 12 Nov 2008) Log Message: ----------- update the version for the next maintenance release Modified Paths: -------------- trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-11-12 20:46:00 UTC (rev 265) +++ trunk/pom.xml 2008-11-12 20:46:50 UTC (rev 266) @@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>wimba.integrations.moodle.vt-lc</groupId> <artifactId>wimba-moodle</artifactId> - <version>3.3.1</version> + <version>3.3.2-SNAPSHOT</version> <!-- The following blocks "repositories" and "profiles" should be present in all our pom.xml --> <!-- artifactory (FR) location --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-11-12 20:46:04
|
Revision: 265 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=265&view=rev Author: trollinger Date: 2008-11-12 20:46:00 +0000 (Wed, 12 Nov 2008) Log Message: ----------- tag moodle 3.3.1 Added Paths: ----------- tags/wimba-moodle-3.3.1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-11-12 20:45:16
|
Revision: 264 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=264&view=rev Author: trollinger Date: 2008-11-12 20:45:14 +0000 (Wed, 12 Nov 2008) Log Message: ----------- remove the snapshot to prepare the tags Modified Paths: -------------- trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-11-12 20:43:51 UTC (rev 263) +++ trunk/pom.xml 2008-11-12 20:45:14 UTC (rev 264) @@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>wimba.integrations.moodle.vt-lc</groupId> <artifactId>wimba-moodle</artifactId> - <version>3.3.1-SNAPSHOT</version> + <version>3.3.1</version> <!-- The following blocks "repositories" and "profiles" should be present in all our pom.xml --> <!-- artifactory (FR) location --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-11-12 20:44:00
|
Revision: 263 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=263&view=rev Author: trollinger Date: 2008-11-12 20:43:51 +0000 (Wed, 12 Nov 2008) Log Message: ----------- update trunk to 3.3.1 Modified Paths: -------------- trunk/pom.xml trunk/src/main/php/integrations_common/php/common/WimbaCommons.php trunk/src/main/php/integrations_common/php/common/WimbaUI.php trunk/src/main/php/integrations_common/php/lc/LCAction.php trunk/src/main/php/integrations_common/php/lc/lcapi.php trunk/src/main/php/integrations_common/php/vt/WimbaVoicetools.php trunk/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php trunk/src/main/php/integrations_common/web/js/lib/prototype/prototype.js trunk/src/main/php/integrations_common/web/js/wimba_ajax.js trunk/src/main/php/mod/liveclassroom/db/upgrade.php trunk/src/main/php/mod/liveclassroom/generateXmlMainPanel.php trunk/src/main/php/mod/liveclassroom/generateXmlSettingsPanel.php trunk/src/main/php/mod/liveclassroom/index.php trunk/src/main/php/mod/liveclassroom/lib.php trunk/src/main/php/mod/liveclassroom/manageAction.php trunk/src/main/php/mod/liveclassroom/mod.html trunk/src/main/php/mod/liveclassroom/version.php trunk/src/main/php/mod/liveclassroom/view.php trunk/src/main/php/mod/liveclassroom/welcome.php trunk/src/main/php/mod/voiceauthoring/index.php trunk/src/main/php/mod/voiceauthoring/lib.php trunk/src/main/php/mod/voiceauthoring/mod.html trunk/src/main/php/mod/voiceauthoring/version.php trunk/src/main/php/mod/voiceauthoring/view.php trunk/src/main/php/mod/voiceauthoring/voiceauthoring.php trunk/src/main/php/mod/voiceemail/block.php trunk/src/main/php/mod/voiceemail/index.php trunk/src/main/php/mod/voiceemail/lib.php trunk/src/main/php/mod/voiceemail/listAvailableRecipients.php trunk/src/main/php/mod/voiceemail/mod.html trunk/src/main/php/mod/voiceemail/version.php trunk/src/main/php/mod/voiceemail/view.php trunk/src/main/php/mod/voicetools/config.html trunk/src/main/php/mod/voicetools/db/upgrade.php trunk/src/main/php/mod/voicetools/mod.html trunk/src/main/php/mod/voicetools_generic/generateXmlMainPanel.php trunk/src/main/php/mod/voicetools_generic/generateXmlSettingsPanel.php trunk/src/main/php/mod/voicetools_generic/index.php trunk/src/main/php/mod/voicetools_generic/lib.php trunk/src/main/php/mod/voicetools_generic/manageAction.php trunk/src/main/php/mod/voicetools_generic/mod.html trunk/src/main/php/mod/voicetools_generic/version.php trunk/src/main/php/mod/voicetools_generic/view.php trunk/src/main/php/mod/voicetools_generic/welcome.php Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/pom.xml 2008-11-12 20:43:51 UTC (rev 263) @@ -2,8 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>wimba.integrations.moodle.vt-lc</groupId> <artifactId>wimba-moodle</artifactId> - <name>Wimba moodle</name> - <version>3.3.0</version> + <version>3.3.1-SNAPSHOT</version> <!-- The following blocks "repositories" and "profiles" should be present in all our pom.xml --> <!-- artifactory (FR) location --> @@ -249,9 +248,27 @@ </copy> - <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetoolsAPI.php" /> - <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetools.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetools.php" /> - <copy file="${basedir}/src/main/php/integrations_common/php/common/WimbaLib.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/common/WimbaLib.php" /> + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetoolsAPI.php"> + <filterset> + <filter token="MODULE_NAME" value="voicetools" /> + <filter token="SHORT_NAME" value="voicetools" /> + <filter token="COMPLETE_NAME" value="Wimba Voice" /> + </filterset> + </copy> + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetools.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetools.php" > + <filterset> + <filter token="MODULE_NAME" value="voicetools" /> + <filter token="SHORT_NAME" value="voicetools" /> + <filter token="COMPLETE_NAME" value="Wimba Voice" /> + </filterset> + </copy> + <copy file="${basedir}/src/main/php/integrations_common/php/common/WimbaLib.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/common/WimbaLib.php"> + <filterset> + <filter token="MODULE_NAME" value="voicetools" /> + <filter token="SHORT_NAME" value="voicetools" /> + <filter token="COMPLETE_NAME" value="Wimba Voice" /> + </filterset> + </copy> <copy todir="${project.build.directory}/generated-sources/mod/voicetools/lib/web" overwrite="true"> <fileset dir="${basedir}/src/main/php/integrations_common/web"> @@ -311,4 +328,4 @@ </site> </distributionManagement> - </project> \ No newline at end of file + </project> Modified: trunk/src/main/php/integrations_common/php/common/WimbaCommons.php =================================================================== --- trunk/src/main/php/integrations_common/php/common/WimbaCommons.php 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/src/main/php/integrations_common/php/common/WimbaCommons.php 2008-11-12 20:43:51 UTC (rev 263) @@ -43,7 +43,7 @@ $this->timeOfLoad = time(); $signature=""; $this->request=$parameters; - if (($this->timeOfLoad - $parameters["time"] <= 10) && ($this->timeOfLoad - $parameters["time"] >= 0)) + if (($this->timeOfLoad - $parameters["time"] <= 1800) && ($this->timeOfLoad - $parameters["time"] >= 0)) {//30 min ksort($parameters); foreach ($parameters as $key => $value) Modified: trunk/src/main/php/integrations_common/php/common/WimbaUI.php =================================================================== --- trunk/src/main/php/integrations_common/php/common/WimbaUI.php 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/src/main/php/integrations_common/php/common/WimbaUI.php 2008-11-12 20:43:51 UTC (rev 263) @@ -335,7 +335,7 @@ } else {//problem to get the vt resource - wimba_add_log(WIMBA_INFO,WV,"No resource have been created yet"); + wimba_add_log(WIMBA_INFO,@MODULE_NAME@_LOGS,"No resource have been created yet"); $this->xml->setError(get_string("error_connection_vt", "@MODULE_NAME@")); } @@ -909,7 +909,7 @@ $this->xml->addSimpleLineElement("label", get_string("settings_enabled_student_eboard", 'liveclassroom')); - if($this->isLectureRoom === true) + if($this->isLectureRoom) { $this->xml->createLine("subPart","lectureRoom"); } @@ -938,7 +938,7 @@ "label", get_string("settings_enabled_breakoutrooms", 'liveclassroom')); - if($this->isLectureRoom === true) + if($this->isLectureRoom) { $this->xml->createLine("subPart","lectureRoom"); } @@ -972,7 +972,7 @@ "label", get_string("settings_enabled_students_breakoutrooms", 'liveclassroom')); - if($this->isLectureRoom === true) + if($this->isLectureRoom) { $this->xml->createLine("","lectureRoom"); } @@ -1202,7 +1202,7 @@ } else { - if ($this->isLectureRoom == false || isset( $this->currentObject ) && $this->currentObject->isArchive()) + if ($this->isLectureRoom === false || isset( $this->currentObject ) && $this->currentObject->isArchive()) { $this->xml->createPanelSettings( get_string("tab_title_chat", 'liveclassroom'), @@ -1972,7 +1972,7 @@ { $optionsMonth = $this->createSelectMonth(); } - if ($this->startSelect == false || $this->currentObject == null) + if ($this->startSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "start_month", @@ -1999,7 +1999,7 @@ { $optionsDay = $this->createSelectDay(); } - if ($this->startSelect == false || $this->currentObject == null) + if ($this->startSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "start_day", @@ -2025,7 +2025,7 @@ { $optionsYear = $this->createSelectYear(); } - if ($this->startSelect == false || $this->currentObject == null) + if ($this->startSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "start_year", @@ -2051,7 +2051,7 @@ { $optionsHour = $this->createSelectHour(); } - if ($this->startSelect == false || $this->currentObject == null) + if ($this->startSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "start_hr", @@ -2078,7 +2078,7 @@ { $optionsMinute = $this->createSelectMin(); } - if ($this->startSelect == false || $this->currentObject == null) + if ($this->startSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "start_min", @@ -2133,7 +2133,7 @@ { $optionsMonth = $this->createSelectMonth(); } - if ($this->endSelect == false || $this->currentObject == null) + if ($this->endSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "end_month", @@ -2160,7 +2160,7 @@ { $optionsDay = $this->createSelectDay(); } - if ($this->endSelect == false || $this->currentObject == null) + if ($this->endSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "end_day", @@ -2187,7 +2187,7 @@ { $optionsYear = $this->createSelectYear(); } - if ($this->endSelect == false || $this->currentObject == null) + if ($this->endSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "end_year", @@ -2214,7 +2214,7 @@ { $optionsHour = $this->createSelectHour(); } - if ($this->endSelect == false || $this->currentObject == null) + if ($this->endSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "end_hr", @@ -2242,7 +2242,7 @@ $optionsMinute = $this->createSelectMin(); } - if ($this->endSelect == false || $this->currentObject == null) + if ($this->endSelect === false || $this->currentObject == null) { $this->xml->createOptionElement( "end_min", @@ -2594,7 +2594,7 @@ $liveclassroom = array (); $archives = array (); $rooms = $this->api->getRooms($this->session->getcourseId() . "_T"); - if ($rooms==false) + if ($rooms === false) { return false; } @@ -2604,7 +2604,7 @@ $id = $room->getRoomId(); $name = $room->getLongname(); $preview = $room->isPreview(); - if ($room->isArchive() == 1) + if ($room->isArchive()) { $archive = new XmlArchive( $id, @@ -2622,7 +2622,7 @@ else { - if ($this->session->isInstructor() || !$this->session->isInstructor() && !$preview == 1) + if ($this->session->isInstructor() || !$this->session->isInstructor() && $preview == 0) { $xmlRoom = new XmlRoom( $id, @@ -2701,9 +2701,9 @@ if( $list != false) { $vtResources = voicetools_api_get_resources($list["rid"]); - if ( $vtResources == false ) // problem + if ( $vtResources === false ) // problem { - wimba_add_log(WIMBA_ERROR,WV,"Problem to get the list of resources from the wv server"); + wimba_add_log(WIMBA_ERROR,@MODULE_NAME@_LOGS,"Problem to get the list of resources from the @MODULE_NAME@_LOGS server"); return false; } else @@ -2713,7 +2713,7 @@ } else//error to get the database content { - wimba_add_log(WIMBA_ERROR,WV,"Problem to get the list of resources from the databse"); + wimba_add_log(WIMBA_ERROR,@MODULE_NAME@_LOGS,"Problem to get the list of resources from the databse"); return false; } @@ -2757,7 +2757,7 @@ $this->session->url_params . "&time=" . time() . "&action=launch"); $xmlResource->setTooltipAvailability(get_string("tooltipVT_" . $preview . "_student", '@MODULE_NAME@')); - if ($this->session->isInstructor() || !$this->session->isInstructor() && $preview === true) + if ($this->session->isInstructor() || !$this->session->isInstructor() && $preview) { $xmlResource->setType($resource->getType()); $resources[$resource->getTitle() . $resource->getRid()] = $xmlResource; Modified: trunk/src/main/php/integrations_common/php/lc/LCAction.php =================================================================== --- trunk/src/main/php/integrations_common/php/lc/LCAction.php 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/src/main/php/integrations_common/php/lc/LCAction.php 2008-11-12 20:43:51 UTC (rev 263) @@ -232,7 +232,7 @@ $this->api->lcapi_remove_user_role($roomId, "Guest", "Student"); } - $error=$this->api->lcapi_get_error(); + $error = $this->api->lcapi_get_error(); if( ! empty($error) ) { return "error"; @@ -400,6 +400,11 @@ } return $version; } + + function getRoomName($roomId) + { + return $this->api->lcapi_get_room_name($roomId); + } } Modified: trunk/src/main/php/integrations_common/php/lc/lcapi.php =================================================================== --- trunk/src/main/php/integrations_common/php/lc/lcapi.php 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/src/main/php/integrations_common/php/lc/lcapi.php 2008-11-12 20:43:51 UTC (rev 263) @@ -116,13 +116,13 @@ var $prefix; var $error=null; // static $tstamp = null; - function LCApi($server, $login, $password,$prefix, $tmppath = "") + function LCApi($server, $login, $password,$prefix_api, $tmppath = "") { $this->_lcapi_config->server = $server; $this->_lcapi_config->login = $login; $this->_lcapi_config->password = $password; $this->_lcapi_config->tmppath = $tmppath; - $this->prefix = $prefix; + $this->prefix = $prefix_api; } function getServer() @@ -680,7 +680,7 @@ } } - wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": retrieved Rooms for $userid and roomid '$roomid': " . print_r($rooms, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": retrieved Rooms for $userid : " . print_r($rooms, true)); return $rooms; } /** Modified: trunk/src/main/php/integrations_common/php/vt/WimbaVoicetools.php =================================================================== --- trunk/src/main/php/integrations_common/php/vt/WimbaVoicetools.php 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/src/main/php/integrations_common/php/vt/WimbaVoicetools.php 2008-11-12 20:43:51 UTC (rev 263) @@ -1430,7 +1430,7 @@ function getUser() { $this->nameSetPair[0] = null; - // $this->nameValuePair = new HWVoiceBoardApi.vbWebService.NameValuePair[hparams.Count]; + // $this->nameValuePair = new H@MODULE_NAME@_LOGSoiceBoardApi.vbWebService.NameValuePair[hparams.Count]; $i = 0; if ($this->hparams != null) { @@ -1512,7 +1512,7 @@ function getMessage() { $this->nameSetPair[0] = null; - // $this->nameValuePair = new HWVoiceBoardApi.vbWebService.NameValuePair[hparams.Count]; + // $this->nameValuePair = new H@MODULE_NAME@_LOGSoiceBoardApi.vbWebService.NameValuePair[hparams.Count]; $i = 0; if ($this->hparams != null) { Modified: trunk/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php =================================================================== --- trunk/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php 2008-11-12 20:43:51 UTC (rev 263) @@ -26,7 +26,7 @@ * * ******************************************************************************/ -/* $Id: WimbaVoicetoolsAPI.php 68873 2008-10-16 00:17:37Z thomasr $ */ +/* $Id: WimbaVoicetoolsAPI.php 70152 2008-11-11 16:30:32Z thomasr $ */ error_reporting(E_ALL); global $CFG; // WebService Client. @@ -86,7 +86,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } // Set the parameters to send to the WebService @@ -96,7 +96,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -105,7 +105,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -113,11 +113,11 @@ if ($resource->error == "error") { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Resource not created because " . $resource->error_message); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource not created because " . $resource->error_message); return false; } - wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Resource Created"); + wimba_add_log (WIMBA_DEBUG, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource Created"); return $resource; } @@ -138,7 +138,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } $resourceArray = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $resource_data); @@ -147,7 +147,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -156,7 +156,7 @@ $err = $soapclient->getError(); if ($err) { // Display the error - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -165,11 +165,11 @@ if ($resource->error == "error") { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Resource not modified because " . $resource->error_message); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource not modified because " . $resource->error_message); return false; } - wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Resource Modified"); + wimba_add_log (WIMBA_DEBUG, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource Modified"); return $resource; } @@ -182,7 +182,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } $resource = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $rid, $mid); @@ -191,7 +191,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -200,7 +200,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -233,7 +233,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } $resource = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $rid); @@ -242,7 +242,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -252,7 +252,7 @@ if ($err) { // Display the error - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -261,11 +261,11 @@ if ($resource->error == "error") { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Resource not deleted because " . $resource->error_message); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource not deleted because " . $resource->error_message); return false; } - wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Resource Deleted"); + wimba_add_log (WIMBA_DEBUG, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource Deleted"); return $resource; } @@ -286,7 +286,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } $resource = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $rid); @@ -321,7 +321,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } $resource = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $rid); @@ -330,7 +330,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -340,7 +340,7 @@ if ($err) { // Display the error - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -348,11 +348,11 @@ $resource = new vtResource($result); if ($resource->error == "error") { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Impossible to get the resource (rid=" . $rid . ") because " . $resource->error_message); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Impossible to get the resource (rid=" . $rid . ") because " . $resource->error_message); return false; } - wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : No problem to get the resource " . $rid); + wimba_add_log (WIMBA_DEBUG, @MODULE_NAME@_LOGS, __FUNCTION__ . " : No problem to get the resource " . $rid); return $resource; } @@ -373,7 +373,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } @@ -382,7 +382,7 @@ $result = $soapclient->call(VT_API_GET_RESOURCES, $resource); if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -392,7 +392,7 @@ if ($err) { // Display the error - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -400,11 +400,11 @@ if ($resources->error == "error") { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Impossible to get the resources " . "because " . $resources->error_message); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Impossible to get the resources " . "because " . $resources->error_message); return false; } - wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : No problem to get the resources " . print_r($ridtable,true)); + wimba_add_log (WIMBA_DEBUG, @MODULE_NAME@_LOGS, __FUNCTION__ . " : No problem to get the resources " . print_r($ridtable,true)); return $resources; } @@ -425,7 +425,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element'); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element'); return false; } @@ -433,7 +433,7 @@ $result = $soapclient->call(VT_API_CREATE_SESSION, $resource); if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -442,7 +442,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -450,11 +450,11 @@ $session = new vtSessionInfo($result); if ($session->error == "error") { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Impossible to create the session because " . $resources->error_message); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Impossible to create the session because " . $resources->error_message); return false; } - wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Session created "); + wimba_add_log (WIMBA_DEBUG, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Session created "); return $session; } @@ -475,14 +475,14 @@ if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element'); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element'); return $err; } $resource = array ($login, $password, $url); $result = $soapclient->call(VT_API_ALLOWEDDOCBASE, $resource); if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return $soapclient->fault; } else @@ -490,7 +490,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return $err; } } @@ -509,7 +509,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element'); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element'); return false; } @@ -519,7 +519,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -528,7 +528,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -576,7 +576,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element'); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element'); return false; } @@ -586,7 +586,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -595,7 +595,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -623,12 +623,12 @@ { if (empty($result)) { // error ("Empty result after call to ".VT_API_SERVICES); - wimba_add_log(WIMBA_ERROR,WV,"voicetool_api_check_result: Empty result after call to " . VT_API_SERVICES); + wimba_add_log(WIMBA_ERROR,@MODULE_NAME@_LOGS,"voicetool_api_check_result: Empty result after call to " . VT_API_SERVICES); return false; } if (voicetools_api_get_status_code($result) != 'ok') { - wimba_add_log(WIMBA_ERROR,WV,"voicetool_api_check_result: " . voicetools_api_get_error_message($result)); + wimba_add_log(WIMBA_ERROR,@MODULE_NAME@_LOGS,"voicetool_api_check_result: " . voicetools_api_get_error_message($result)); return false; } return true; @@ -687,7 +687,7 @@ if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Error to create the soap element : ' . $err); return false; } @@ -704,7 +704,7 @@ if ($soapclient->fault) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); return false; } else @@ -713,7 +713,7 @@ $err = $soapclient->getError(); if ($err) { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . ' : error with the web service : ' . $err); return false; } } @@ -721,11 +721,11 @@ if ($resource->error == "error") { - wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Resource not created because " . $resource->error_message); + wimba_add_log (WIMBA_ERROR, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource not created because " . $resource->error_message); return false; } - wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Resource Created"); + wimba_add_log (WIMBA_DEBUG, @MODULE_NAME@_LOGS, __FUNCTION__ . " : Resource Created"); return $resource; } Modified: trunk/src/main/php/integrations_common/web/js/lib/prototype/prototype.js =================================================================== --- trunk/src/main/php/integrations_common/web/js/lib/prototype/prototype.js 2008-10-29 18:08:49 UTC (rev 262) +++ trunk/src/main/php/integrations_common/web/js/lib/prototype/prototype.js 2008-11-12 20:43:51 UTC (rev 263) @@ -1,4221 +1,4221 @@ @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-10-29 18:08:55
|
Revision: 262 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=262&view=rev Author: trollinger Date: 2008-10-29 18:08:49 +0000 (Wed, 29 Oct 2008) Log Message: ----------- Tag Wimba Moodle 3.3.0 Added Paths: ----------- tags/wimba-moodle-3.3.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-10-29 18:07:03
|
Revision: 261 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=261&view=rev Author: trollinger Date: 2008-10-29 18:06:54 +0000 (Wed, 29 Oct 2008) Log Message: ----------- update trunk to the current version(3.3.0) Added Paths: ----------- trunk/pom.xml trunk/src/ trunk/src/main/ trunk/src/main/assembly/ trunk/src/main/assembly/descriptor.xml trunk/src/main/php/ trunk/src/main/php/blocks/ trunk/src/main/php/blocks/bvoiceemail/ trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php trunk/src/main/php/blocks/bvoiceemail/config_instance.html trunk/src/main/php/blocks/bvoicerecorder/ trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php trunk/src/main/php/blocks/bvoicerecorder/config_global.html trunk/src/main/php/blocks/bvoicerecorder/config_instance.html trunk/src/main/php/integrations_common/ trunk/src/main/php/integrations_common/php/ trunk/src/main/php/integrations_common/php/common/ trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php trunk/src/main/php/integrations_common/php/common/WimbaCommons.php trunk/src/main/php/integrations_common/php/common/WimbaLib.php trunk/src/main/php/integrations_common/php/common/WimbaUI.php trunk/src/main/php/integrations_common/php/common/WimbaXml.php trunk/src/main/php/integrations_common/php/common/XmlArchive.php trunk/src/main/php/integrations_common/php/common/XmlOrphanedArchive.php trunk/src/main/php/integrations_common/php/common/XmlResource.php trunk/src/main/php/integrations_common/php/common/XmlRoom.php trunk/src/main/php/integrations_common/php/common/domxml-php4-php5.php trunk/src/main/php/integrations_common/php/lc/ trunk/src/main/php/integrations_common/php/lc/LCAction.php trunk/src/main/php/integrations_common/php/lc/LCRoom.php trunk/src/main/php/integrations_common/php/lc/LCUser.php trunk/src/main/php/integrations_common/php/lc/PrefixUtil.php trunk/src/main/php/integrations_common/php/lc/lcapi.php trunk/src/main/php/integrations_common/php/vt/ trunk/src/main/php/integrations_common/php/vt/VtAction.php trunk/src/main/php/integrations_common/php/vt/WimbaVoicetools.php trunk/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php trunk/src/main/php/integrations_common/web/ trunk/src/main/php/integrations_common/web/js/ trunk/src/main/php/integrations_common/web/js/constants.js trunk/src/main/php/integrations_common/web/js/lib/ trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/ trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/AUTHORS trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/COPYING trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/README trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/dom.js trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/util.js trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/xmltoken.js trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/xpath.js trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/xslt.js trunk/src/main/php/integrations_common/web/js/lib/iepngfix/ trunk/src/main/php/integrations_common/web/js/lib/iepngfix/iepngfix.htc trunk/src/main/php/integrations_common/web/js/lib/iepngfix/iepngfix_tilebg.js trunk/src/main/php/integrations_common/web/js/lib/prototype/ trunk/src/main/php/integrations_common/web/js/lib/prototype/prototype.js trunk/src/main/php/integrations_common/web/js/md5.inc trunk/src/main/php/integrations_common/web/js/verifForm.js trunk/src/main/php/integrations_common/web/js/wimba_ajax.js trunk/src/main/php/integrations_common/web/js/wimba_commons.js trunk/src/main/php/integrations_common/web/js/xsl/ trunk/src/main/php/integrations_common/web/js/xsl/wimba.xsl trunk/src/main/php/integrations_common/web/pictures/ trunk/src/main/php/integrations_common/web/pictures/backgrounds/ trunk/src/main/php/integrations_common/web/pictures/backgrounds/filterbar.png trunk/src/main/php/integrations_common/web/pictures/backgrounds/headerbar.png trunk/src/main/php/integrations_common/web/pictures/backgrounds/toolbar.png trunk/src/main/php/integrations_common/web/pictures/box/ trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/ trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/ trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-bottom-left.png trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-bottom-right.png trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-top-left.png trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-top-right.png trunk/src/main/php/integrations_common/web/pictures/buttons/ trunk/src/main/php/integrations_common/web/pictures/buttons/flat/ trunk/src/main/php/integrations_common/web/pictures/buttons/flat/close/ trunk/src/main/php/integrations_common/web/pictures/buttons/flat/close/x_round-16_14.png trunk/src/main/php/integrations_common/web/pictures/items/ trunk/src/main/php/integrations_common/web/pictures/items/Wlogo-W_only-60.png trunk/src/main/php/integrations_common/web/pictures/items/headerbar-logo.png trunk/src/main/php/integrations_common/web/pictures/items/listitem-available.jpg trunk/src/main/php/integrations_common/web/pictures/items/listitem-available.png trunk/src/main/php/integrations_common/web/pictures/items/listitem-available_selected.jpg trunk/src/main/php/integrations_common/web/pictures/items/listitem-hide.png trunk/src/main/php/integrations_common/web/pictures/items/listitem-info.png trunk/src/main/php/integrations_common/web/pictures/items/listitem-information-16_12.png trunk/src/main/php/integrations_common/web/pictures/items/listitem-show.png trunk/src/main/php/integrations_common/web/pictures/items/listitem-subitem-selected.jpg trunk/src/main/php/integrations_common/web/pictures/items/listitem-subitem.jpg trunk/src/main/php/integrations_common/web/pictures/items/listitem-unavailable.jpg trunk/src/main/php/integrations_common/web/pictures/items/listitem-unavailable.png trunk/src/main/php/integrations_common/web/pictures/items/listitem-unavailable_selected.jpg trunk/src/main/php/integrations_common/web/pictures/items/phone_32.png trunk/src/main/php/integrations_common/web/pictures/items/phone_60.png trunk/src/main/php/integrations_common/web/pictures/items/speaker-18.gif trunk/src/main/php/integrations_common/web/pictures/items/warning.png trunk/src/main/php/integrations_common/web/pictures/items/wheel-24.gif trunk/src/main/php/integrations_common/web/pictures/items/wimba_sound.png trunk/src/main/php/integrations_common/web/pictures/items/x_round-16_14.png trunk/src/main/php/integrations_common/web/pictures/items/yes-60.png trunk/src/main/php/integrations_common/web/pictures/module_tab/ trunk/src/main/php/integrations_common/web/pictures/module_tab/module_tab-left.png trunk/src/main/php/integrations_common/web/pictures/module_tab/module_tab-right.png trunk/src/main/php/integrations_common/web/pictures/regular_btn/ trunk/src/main/php/integrations_common/web/pictures/regular_btn/regular_btn-left.png trunk/src/main/php/integrations_common/web/pictures/regular_btn/regular_btn-right.png trunk/src/main/php/integrations_common/web/pictures/regular_btn/regular_btn-submit.png trunk/src/main/php/integrations_common/web/pictures/search/ trunk/src/main/php/integrations_common/web/pictures/search/search-left.png trunk/src/main/php/integrations_common/web/pictures/search/search-right.png trunk/src/main/php/integrations_common/web/pictures/search/x_round-16_12-over.png trunk/src/main/php/integrations_common/web/pictures/search/x_round-16_12.png trunk/src/main/php/integrations_common/web/pictures/tabs/ trunk/src/main/php/integrations_common/web/pictures/tabs/tab-left.png trunk/src/main/php/integrations_common/web/pictures/tabs/tab-right.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/ trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/add_activity.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/content.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/delete.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/launch.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/new.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/reports.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/settings.png trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/squared_btn.png trunk/src/main/php/mod/ trunk/src/main/php/mod/liveclassroom/ trunk/src/main/php/mod/liveclassroom/backuplib.php trunk/src/main/php/mod/liveclassroom/config.html trunk/src/main/php/mod/liveclassroom/css/ trunk/src/main/php/mod/liveclassroom/css/StyleSheet.css trunk/src/main/php/mod/liveclassroom/db/ trunk/src/main/php/mod/liveclassroom/db/access.php trunk/src/main/php/mod/liveclassroom/db/install.xml trunk/src/main/php/mod/liveclassroom/db/migrate2utf8.php trunk/src/main/php/mod/liveclassroom/db/migrate2utf8.xml trunk/src/main/php/mod/liveclassroom/db/mysql.php trunk/src/main/php/mod/liveclassroom/db/mysql.sql trunk/src/main/php/mod/liveclassroom/db/postgres7.php trunk/src/main/php/mod/liveclassroom/db/postgres7.sql trunk/src/main/php/mod/liveclassroom/db/upgrade.php trunk/src/main/php/mod/liveclassroom/generateXmlMainPanel.php trunk/src/main/php/mod/liveclassroom/generateXmlSettingsPanel.php trunk/src/main/php/mod/liveclassroom/icon.gif trunk/src/main/php/mod/liveclassroom/index.php trunk/src/main/php/mod/liveclassroom/lang/ trunk/src/main/php/mod/liveclassroom/lang/en/ trunk/src/main/php/mod/liveclassroom/lang/en/help/ trunk/src/main/php/mod/liveclassroom/lang/en/help/liveclassroom/ trunk/src/main/php/mod/liveclassroom/lang/en/help/liveclassroom/mods.html trunk/src/main/php/mod/liveclassroom/lang/en/liveclassroom.php trunk/src/main/php/mod/liveclassroom/lang/en_utf8/ trunk/src/main/php/mod/liveclassroom/lang/en_utf8/block_bliveclassroom.php trunk/src/main/php/mod/liveclassroom/lang/en_utf8/help/ trunk/src/main/php/mod/liveclassroom/lang/en_utf8/help/liveclassroom/ trunk/src/main/php/mod/liveclassroom/lang/en_utf8/help/liveclassroom/mods.html trunk/src/main/php/mod/liveclassroom/lang/en_utf8/liveclassroom.php trunk/src/main/php/mod/liveclassroom/lang/fr/ trunk/src/main/php/mod/liveclassroom/lang/fr/help/ trunk/src/main/php/mod/liveclassroom/lang/fr/help/liveclassroom/ trunk/src/main/php/mod/liveclassroom/lang/fr/help/liveclassroom/mods.html trunk/src/main/php/mod/liveclassroom/lang/fr/liveclassroom.php trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/ trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/help/ trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/help/liveclassroom/ trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/help/liveclassroom/mods.html trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/liveclassroom.php trunk/src/main/php/mod/liveclassroom/lib.php trunk/src/main/php/mod/liveclassroom/loglist.php trunk/src/main/php/mod/liveclassroom/logs.php trunk/src/main/php/mod/liveclassroom/manageAction.php trunk/src/main/php/mod/liveclassroom/mod.html trunk/src/main/php/mod/liveclassroom/reports.php trunk/src/main/php/mod/liveclassroom/restorelib.php trunk/src/main/php/mod/liveclassroom/version.php trunk/src/main/php/mod/liveclassroom/view.php trunk/src/main/php/mod/liveclassroom/welcome.php trunk/src/main/php/mod/voiceauthoring/ trunk/src/main/php/mod/voiceauthoring/backuplib.php trunk/src/main/php/mod/voiceauthoring/block_config.php trunk/src/main/php/mod/voiceauthoring/css/ trunk/src/main/php/mod/voiceauthoring/css/StyleSheet.css trunk/src/main/php/mod/voiceauthoring/db/ trunk/src/main/php/mod/voiceauthoring/db/access.php trunk/src/main/php/mod/voiceauthoring/db/install.xml trunk/src/main/php/mod/voiceauthoring/db/mysql.php trunk/src/main/php/mod/voiceauthoring/db/mysql.sql trunk/src/main/php/mod/voiceauthoring/db/postgres7.php trunk/src/main/php/mod/voiceauthoring/db/postgres7.sql trunk/src/main/php/mod/voiceauthoring/displayActivityName.php trunk/src/main/php/mod/voiceauthoring/displayPlayer.php trunk/src/main/php/mod/voiceauthoring/displayWysiwyg.php trunk/src/main/php/mod/voiceauthoring/enableVA.php trunk/src/main/php/mod/voiceauthoring/error.php trunk/src/main/php/mod/voiceauthoring/icon.gif trunk/src/main/php/mod/voiceauthoring/index.php trunk/src/main/php/mod/voiceauthoring/lang/ trunk/src/main/php/mod/voiceauthoring/lang/en/ trunk/src/main/php/mod/voiceauthoring/lang/en/voiceauthoring.php trunk/src/main/php/mod/voiceauthoring/lang/en_utf8/ trunk/src/main/php/mod/voiceauthoring/lang/en_utf8/voiceauthoring.php trunk/src/main/php/mod/voiceauthoring/lang/fr/ trunk/src/main/php/mod/voiceauthoring/lang/fr/voiceauthoring.php trunk/src/main/php/mod/voiceauthoring/lang/fr_utf8/ trunk/src/main/php/mod/voiceauthoring/lang/fr_utf8/voiceauthoring.php trunk/src/main/php/mod/voiceauthoring/lib.php trunk/src/main/php/mod/voiceauthoring/manageActionBlock.php trunk/src/main/php/mod/voiceauthoring/mod.html trunk/src/main/php/mod/voiceauthoring/restorelib.php trunk/src/main/php/mod/voiceauthoring/version.php trunk/src/main/php/mod/voiceauthoring/view.php trunk/src/main/php/mod/voiceauthoring/voiceauthoring.php trunk/src/main/php/mod/voiceemail/ trunk/src/main/php/mod/voiceemail/backuplib.php trunk/src/main/php/mod/voiceemail/block.php trunk/src/main/php/mod/voiceemail/block_config.php trunk/src/main/php/mod/voiceemail/css/ trunk/src/main/php/mod/voiceemail/css/StyleSheet.css trunk/src/main/php/mod/voiceemail/db/ trunk/src/main/php/mod/voiceemail/db/access.php trunk/src/main/php/mod/voiceemail/db/install.xml trunk/src/main/php/mod/voiceemail/db/mysql.php trunk/src/main/php/mod/voiceemail/db/mysql.sql trunk/src/main/php/mod/voiceemail/db/postgres7.php trunk/src/main/php/mod/voiceemail/db/postgres7.sql trunk/src/main/php/mod/voiceemail/icon.gif trunk/src/main/php/mod/voiceemail/index.php trunk/src/main/php/mod/voiceemail/lang/ trunk/src/main/php/mod/voiceemail/lang/en/ trunk/src/main/php/mod/voiceemail/lang/en/voiceemail.php trunk/src/main/php/mod/voiceemail/lang/en_utf8/ trunk/src/main/php/mod/voiceemail/lang/en_utf8/voiceemail.php trunk/src/main/php/mod/voiceemail/lang/fr/ trunk/src/main/php/mod/voiceemail/lang/fr/voiceemail.php trunk/src/main/php/mod/voiceemail/lang/fr_utf8/ trunk/src/main/php/mod/voiceemail/lang/fr_utf8/voiceemail.php trunk/src/main/php/mod/voiceemail/lib.php trunk/src/main/php/mod/voiceemail/listAvailableRecipients.php trunk/src/main/php/mod/voiceemail/manageActionBlock.php trunk/src/main/php/mod/voiceemail/mod.html trunk/src/main/php/mod/voiceemail/restorelib.php trunk/src/main/php/mod/voiceemail/version.php trunk/src/main/php/mod/voiceemail/view.php trunk/src/main/php/mod/voicetools/ trunk/src/main/php/mod/voicetools/config.html trunk/src/main/php/mod/voicetools/css/ trunk/src/main/php/mod/voicetools/css/StyleSheet.css trunk/src/main/php/mod/voicetools/db/ trunk/src/main/php/mod/voicetools/db/mysql.php trunk/src/main/php/mod/voicetools/db/mysql.sql trunk/src/main/php/mod/voicetools/db/postgres7.php trunk/src/main/php/mod/voicetools/db/postgres7.sql trunk/src/main/php/mod/voicetools/db/upgrade.php trunk/src/main/php/mod/voicetools/defaults.php trunk/src/main/php/mod/voicetools/icon.gif trunk/src/main/php/mod/voicetools/lang/ trunk/src/main/php/mod/voicetools/lang/en/ trunk/src/main/php/mod/voicetools/lang/en/voicetools.php trunk/src/main/php/mod/voicetools/lang/en_utf8/ trunk/src/main/php/mod/voicetools/lang/en_utf8/voicetools.php trunk/src/main/php/mod/voicetools/lib.php trunk/src/main/php/mod/voicetools/loglist.php trunk/src/main/php/mod/voicetools/logs.php trunk/src/main/php/mod/voicetools/mod.html trunk/src/main/php/mod/voicetools/testConfig.php trunk/src/main/php/mod/voicetools/version.php trunk/src/main/php/mod/voicetools_generic/ trunk/src/main/php/mod/voicetools_generic/backuplib.php trunk/src/main/php/mod/voicetools_generic/css/ trunk/src/main/php/mod/voicetools_generic/css/StyleSheet.css trunk/src/main/php/mod/voicetools_generic/db/ trunk/src/main/php/mod/voicetools_generic/db/access.php trunk/src/main/php/mod/voicetools_generic/db/install.xml trunk/src/main/php/mod/voicetools_generic/db/mysql.php trunk/src/main/php/mod/voicetools_generic/db/mysql.sql trunk/src/main/php/mod/voicetools_generic/db/postgres7.php trunk/src/main/php/mod/voicetools_generic/db/postgres7.sql trunk/src/main/php/mod/voicetools_generic/error.php trunk/src/main/php/mod/voicetools_generic/generateXmlMainPanel.php trunk/src/main/php/mod/voicetools_generic/generateXmlSettingsPanel.php trunk/src/main/php/mod/voicetools_generic/index.php trunk/src/main/php/mod/voicetools_generic/lang/ trunk/src/main/php/mod/voicetools_generic/lang/english_bundle.php trunk/src/main/php/mod/voicetools_generic/lang/english_help.html trunk/src/main/php/mod/voicetools_generic/lang/french_bundle.php trunk/src/main/php/mod/voicetools_generic/lang/french_help.html trunk/src/main/php/mod/voicetools_generic/lib.php trunk/src/main/php/mod/voicetools_generic/logs.php trunk/src/main/php/mod/voicetools_generic/manageAction.php trunk/src/main/php/mod/voicetools_generic/mod.html trunk/src/main/php/mod/voicetools_generic/restorelib.php trunk/src/main/php/mod/voicetools_generic/version.php trunk/src/main/php/mod/voicetools_generic/view.php trunk/src/main/php/mod/voicetools_generic/voiceboard.png trunk/src/main/php/mod/voicetools_generic/voicepodcaster.png trunk/src/main/php/mod/voicetools_generic/voicepresentation.png trunk/src/main/php/mod/voicetools_generic/welcome.php trunk/wysiwyg/ trunk/wysiwyg/images/ trunk/wysiwyg/images/wimba.gif trunk/wysiwyg/images/wimba_sound.png trunk/wysiwyg/lib/ trunk/wysiwyg/lib/editor/ trunk/wysiwyg/lib/editor/htmlarea/ trunk/wysiwyg/lib/editor/htmlarea/htmlarea.php trunk/wysiwyg/lib/weblib.php trunk/wysiwyg/popups/ trunk/wysiwyg/popups/insert_wimba.php trunk/wysiwyg/wimba.patch Removed Paths: ------------- trunk/integrations_common/ trunk/moodle/ trunk/wysiwyg/images/ trunk/wysiwyg/images/wimba.gif trunk/wysiwyg/images/wimba_sound.png trunk/wysiwyg/lib/ trunk/wysiwyg/lib/editor/ trunk/wysiwyg/lib/editor/htmlarea/ trunk/wysiwyg/lib/editor/htmlarea/htmlarea.php trunk/wysiwyg/lib/weblib.php trunk/wysiwyg/popups/ trunk/wysiwyg/popups/insert_wimba.php trunk/wysiwyg/wimba.patch Added: trunk/pom.xml =================================================================== --- trunk/pom.xml (rev 0) +++ trunk/pom.xml 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,314 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>wimba.integrations.moodle.vt-lc</groupId> + <artifactId>wimba-moodle</artifactId> + <name>Wimba moodle</name> + <version>3.3.0</version> + + <!-- The following blocks "repositories" and "profiles" should be present in all our pom.xml --> + <!-- artifactory (FR) location --> + <repositories> + <repository> + <id>central</id> + <name>wimba artifactory (FR)</name> + <url>http://artifactoryfr.wimba.com/artifactory/repo</url> + </repository> + </repositories> + <profiles> + <!-- use this profile to download artifacts from NY repository --> + <profile> + <id>ny</id> + <repositories> + <repository> + <id>central</id> + <name>wimba artifactory (US)</name> + <url>http://artifactoryus.wimba.com/artifactory/repo</url> + </repository> + </repositories> + </profile> + </profiles> + + <build> + <plugins> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>prepare-sources</id> + <phase>generate-sources</phase> + <configuration> + <tasks> + <copy todir="${project.build.directory}/generated-sources/mod/voiceboard" overwrite="true"> + <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> + <exclude name="**/*bundle*" /> + <exclude name="**/*help*" /> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepodcaster" overwrite="true"> + <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> + <exclude name="**/*bundle*" /> + <exclude name="**/*help*" /> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepresentation" overwrite="true"> + <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> + <exclude name="**/*bundle*" /> + <exclude name="**/*help*" /> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/help/voicepresentation/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/help/voicepresentation/mods.html" /> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/help/voicepresentation/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/help/voicepresentation/mods.html" /> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/voicepresentation.png" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/icon.gif" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/voiceboard.png" tofile="${project.build.directory}/generated-sources/mod/voiceboard/icon.gif" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/voicepodcaster.png" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/icon.gif" /> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepodcaster/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepresentation/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voiceboard/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/liveclassroom/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="liveclassroom" /> + <filter token="SHORT_NAME" value="lc" /> + <filter token="COMPLETE_NAME" value="Wimba Classroom" /> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voiceemail/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voiceemail" /> + <filter token="SHORT_NAME" value="vmail" /> + <filter token="COMPLETE_NAME" value="Voice Email" /> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voiceauthoring/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voiceauthoring" /> + <filter token="SHORT_NAME" value="recorder" /> + <filter token="COMPLETE_NAME" value="Voice Authoring" /> + </filterset> + </copy> + + + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetoolsAPI.php" /> + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetools.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetools.php" /> + <copy file="${basedir}/src/main/php/integrations_common/php/common/WimbaLib.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/common/WimbaLib.php" /> + + <copy todir="${project.build.directory}/generated-sources/mod/voicetools/lib/web" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common/web"> + </fileset> + </copy> + + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + + <!-- plugin to assembly the zip, phase=package --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <goals> + <!-- bug http://jira.codehaus.org/browse/MASSEMBLY-97 --> + <!-- It should be 'attached' instead of 'single' --> + <goal>single</goal> + </goals> + <phase>package</phase> + <id>make-assembly</id> + </execution> + </executions> + <configuration> + <finalName>wimba-moodle-${project.version}</finalName> + <descriptors> + <descriptor>${basedir}/src/main/assembly/descriptor.xml</descriptor> + </descriptors> + </configuration> + </plugin> + </plugins> + </build> + + <distributionManagement> + <repository> + <id>wimba-internal-repository</id> + <name>wimba artifactory (FR)</name> + <url>dav:http://artifactoryfr.wimba.com/artifactory/wimba-internal-repository</url> + <uniqueVersion>false</uniqueVersion> + </repository> + <snapshotRepository> + <uniqueVersion>true</uniqueVersion> + <id>wimba-internal-repository-snapshots</id> + <name>wimba artifactory (FR) snapshot</name> + <url>dav:http://artifactoryfr.wimba.com/artifactory/wimba-internal-repository-snapshots</url> + </snapshotRepository> + <site> + <id>wimba-site-fr</id> + <url>scp://mvn-site.wimba.com/var/www/html/mvn2-sites/moodle/${project.version}/</url> + </site> + </distributionManagement> + + </project> \ No newline at end of file Added: trunk/src/main/assembly/descriptor.xml =================================================================== --- trunk/src/main/assembly/descriptor.xml (rev 0) +++ trunk/src/main/assembly/descriptor.xml 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,25 @@ +<assembly> + <formats> + <format>zip</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <fileSets> + <fileSet> + <directory>target/generated-sources</directory> + + <outputDirectory></outputDirectory> + </fileSet> + <fileSet> + <directory>src/main/php</directory> + <excludes> + <exclude> + **/voicetools_generic/** + </exclude> + <exclude> + **/integrations_common/** + </exclude> + </excludes> + <outputDirectory></outputDirectory> + </fileSet> + </fileSets> +</assembly> \ No newline at end of file Added: trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php =================================================================== --- trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php (rev 0) +++ trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,58 @@ +<?PHP + +require_once($CFG->libdir.'/datalib.php'); + +class block_bvoiceemail extends block_base { + + function init() { + $this->title = "Voice E-Mail"; + $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/voiceemail/block.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="220px" height="150px"></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/src/main/php/blocks/bvoiceemail/config_instance.html =================================================================== --- trunk/src/main/php/blocks/bvoiceemail/config_instance.html (rev 0) +++ trunk/src/main/php/blocks/bvoiceemail/config_instance.html 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,9 @@ +<?php +global $COURSE; + +?> +<div align="center"> +<iframe width="750px" align="center" height="300px" src="<?php echo $CFG->wwwroot;?>/mod/voiceemail/block_config.php?course_id=<?php echo $COURSE->id?>&block_id=<?php echo $this->instance->id?>" style="overflow:hidden" FRAMEBORDER="0"></iframe> +</div> + + Added: trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php =================================================================== --- trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php (rev 0) +++ trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,58 @@ +<?PHP + +require_once($CFG->libdir.'/datalib.php'); + +class block_bvoiceemail extends block_base { + + function init() { + $this->title = "Voice E-Mail"; + $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/voiceemail/block.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="220px" height="150px"></iframe>'; + $this->content->text .= '</td></tr>'; + $this->content->text .= '</table>'; + + return $this->content; + } + + function instance_allow_multiple() { + return false; + } + + + function instance_allow_config() { + return true; + } + function has_config() { + return true; + } + +} + + +?> \ No newline at end of file Added: trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php =================================================================== --- trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php (rev 0) +++ trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,76 @@ +<?PHP + + +require_once($CFG->libdir.'/datalib.php'); + + +class block_bvoicerecorder extends block_base { + + function init() { + + $this->title = "Voice Authoring"; + $this->version = 2008111200; + } + + function specialization() { + $block_info = get_record("voiceauthoring_block","bid",$this->instance->id); + $this->title = isset($block_info->title) ? format_string($block_info->title) : format_string("Voice Authoring"); + } + + function preferred_width() { + return 215 ; + } + + 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/voiceauthoring/voiceauthoring.php?course_id='.$COURSE->id. + '&block_id='.$this->instance->id. + 'name="frameWidget" style="overflow:hidden;margin-top:-10px" + FRAMEBORDER=0 width="215px" height="150px"></iframe>'; + + $this->content->text .= '</td></tr>'; + $this->content->text .= '</table>'; + + + + return $this->content; + } + function instance_allow_multiple() { + return true; + } + + + function instance_allow_config() { + return false; + } + function has_config() { + return false; + } + +} + + +?> + Added: trunk/src/main/php/blocks/bvoicerecorder/config_global.html =================================================================== --- trunk/src/main/php/blocks/bvoicerecorder/config_global.html (rev 0) +++ trunk/src/main/php/blocks/bvoicerecorder/config_global.html 2008-10-29 18:06:54 UTC (rev 261) @@ -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/src/main/php/blocks/bvoicerecorder/config_instance.html =================================================================== --- trunk/src/main/php/blocks/bvoicerecorder/config_instance.html (rev 0) +++ trunk/src/main/php/blocks/bvoicerecorder/config_instance.html 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,9 @@ +<?php +global $COURSE; + +?> +<div align="center"> +<iframe width="750px" align="center" height="300px" src="<?php echo $CFG->wwwroot;?>/mod/voiceauthoring/block_config.php?course_id=<?php echo $COURSE->id?>&block_id=<?php echo $this->instance->id?>" style="overflow:hidden" FRAMEBORDER="0"></iframe> +</div> + + Added: trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php =================================================================== --- trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php (rev 0) +++ trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,177 @@ +<?php + +function storeResource($rid,$course_id, $params) +{ + + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + // if(isset($params["name"])) + //{ + // $voicetools->name = $params["name"]; + //} + // $voicetools->type = $params["type"]; + + if ($params != null && $params["default"]=="false") + { + $voicetools->availability = $params["accessAvailable"]; + if ($params["start_date"] == "true") + { + $start_hr = intval($params["start_hr"]); + $start_min = intval($params["start_min"]); + $start_month = intval($params["start_month"]); + $start_day = intval($params["start_day"]); + $start_year = intval($params["start_year"]); + $voicetools->start_date = mktime($start_hr, $start_min, 0, $start_month, $start_day, $start_year); + } + else + { + $voicetools->start_date = -1; + } + + if ($params["end_date"] == "true") { + $end_hr = intval($params["end_hr"]); + $end_min = intval($params["end_min"]); + $end_month = intval($params["end_month"]); + $end_day = intval($params["end_day"]); + $end_year = intval($params["end_year"]); + $voicetools->end_date = mktime($end_hr, $end_min, 0, $end_month, $end_day, $end_year); + } + else + { + $voicetools->end_date = -1; + } + } + else + {//defualt value + $voicetools->availability = 1; + $voicetools->start_date = -1; + $voicetools->end_date = -1; + } + return @MODULE_NAME@_store_new_element($voicetools); +} + +function storeRecorderResource($rid,$course_id, $mid) +{ + + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + $voicetools->mid = $mid; + + + return @MODULE_NAME@_store_new_element($voicetools); +} + +function storeVmailResource($rid,$course_id, $block_id='0') +{ + + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + $voicetools->block = $block_id; + + + return @MODULE_NAME@_store_new_element($voicetools); +} + +function updateRecorderResource($rid,$course_id, $mid) +{ + + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + $voicetools->mid = $mid; + + + return @MODULE_NAME@_update_element($voicetools); +} + +function updateVmailResource($rid,$course_id, $block_id='') +{ + + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + $voicetools->block = $block_id; + + + return @MODULE_NAME@_update_element($voicetools); +} + + +function updateResource($rid,$course_id, $params) +{ + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + $voicetools->type = $params["type"]; + $voicetools->availability = $params["accessAvailable"]; + + if ($params["start_date"] == "true") + { + $start_hr = intval($params["start_hr"]); + $start_min = intval($params["start_min"]); + $start_month = intval($params["start_month"]); + $start_day = intval($params["start_day"]); + $start_year = intval($params["start_year"]); + $voicetools->start_date = mktime($start_hr, $start_min, 0, $start_month, $start_day, $start_year); + } + else + { + $voicetools->start_date = -1; + } + + if ($params["end_date"] == "true") { + $end_hr = intval($params["end_hr"]); + $end_min = intval($params["end_min"]); + $end_month = intval($params["end_month"]); + $end_day = intval($params["end_day"]); + $end_year = intval($params["end_year"]); + $voicetools->end_date = mktime($end_hr, $end_min, 0, $end_month, $end_day, $end_year); + } + else + { + $voicetools->end_date = -1; + } + return @MODULE_NAME@_update_element($voicetools); +} + +function isVtAvailable($rid) +{ + $preview = false; + $vt_informations = @MODULE_NAME@_get_voicetool_informations($rid); + + if ($vt_informations != null && $vt_informations->availability == 0) + { + $preview = false; + } + elseif ($vt_informations != null && $vt_informations->start_date == -1 && $vt_informations->end_date == -1) + { + $preview = true; + } + elseif ($vt_informations != null && $vt_informations->start_date == -1 && time() <= $vt_informations->end_date) + { + $preview = true; + } + elseif ($vt_informations != null && $vt_informations->start_date < time() && $vt_informations->end_date == -1) + { + $preview = true; + } + elseif ($vt_informations != null && $vt_informations->start_date < time() && time() < $vt_informations->end_date) + { + $preview = true; + } + else { + $preview = false; + } + + return $preview; +} + + + + + + +?> \ No newline at end of file Added: trunk/src/main/php/integrations_common/php/common/WimbaCommons.php =================================================================== --- trunk/src/main/php/integrations_common/php/common/WimbaCommons.php (rev 0) +++ trunk/src/main/php/integrations_common/php/common/WimbaCommons.php 2008-10-29 18:06:54 UTC (rev 261) @@ -0,0 +1,187 @@ +<?php +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: January 2007 * + * * + ******************************************************************************/ + +/* $Id: WimbaVoicetoolsAPI.php 45764 2007-02-28 22:04:25Z thomasr $ */ +class WimbaMoodleSession{ + + var $hparams=array(); + var $url_params; + var $signature=""; + var $currentVtUser ; + var $currentVtUserRigths; + var $timeOfLoad; + var $error=false; + var $request; + + + function WimbaMoodleSession($parameters=NULL){ + $this->timeOfLoad = time(); + $signature=""; + $this->request=$parameters; + if (($this->timeOfLoad - $parameters["time"] <= 10) && ($this->timeOfLoad - $parameters["time"] >= 0)) + {//30 min + ksort($parameters); + foreach ($parameters as $key => $value) + { + if (strstr($key, 'enc_'))//param use to signature + { + if( $value=="") + { + $this->hparams[substr($key,4)] =""; + } + else + { + $this->hparams[substr($key,4)] =rawurldecode($value); + } + $signature .= rawurldecode($value); + $this->url_params .= "enc_".substr($key,4)."=".rawurlencode($value)."&"; + } + } + + if ($parameters["signature"] != md5($signature))//good signatureature + { + $this->error="signature"; + } + $this->signature=md5($signature); + $this->url_params .="signature=".rawurlencode($this->signature); + } + else//session time out + { + $this->error="session"; + } + } + + function getCourseId(){ + + if(isset($this->hparams["course_id"])) + { + return $this->hparams["course_id"]; + } + return null; + } + + function getLcCurrentUser(){ + if($this->isInstructor()) + { + return $this->getCourseId()."_T"; + } + return $this->getCourseId()."_S"; + } + + function setCurrentVtUSer($product,$screenName="",$email="",$role=""){ + $this->currentVtUser = new VtUser(NULL); + $this->currentVtUserRigths = new VtRights(NULL); + + if($screenName=="") + { + $this->currentVtUser->setScreenName($this->hparams["firstname"]."_".$this->hparams["lastname"]); + } + else + { + $this->currentVtUser->setScreenName($screenName); + } + + if($email=="") + { + $this->currentVtUser->setEmail ($this->hparams["email"]); + } + else + { + $this->currentVtUser->setEmail ( $email); + } + + + if (($role!="" && $role=="Instructor") || ($role=="" && $this->hparams["role"]=="Instructor")) + { + $this->setVtUserRigths($product,"instructor"); + } + else + { + $this->setVtUserRigths($product,"student"); + } + + } + + + function getVtUser(){ + return $this->currentVtUser; + } + + function getVtUserRigths(){ + return $this->currentVtUserRigths; + } + + function setVtUserRigths($product,$role){ + $this->currentVtUserRigths->setProfile ( 'moodle.'.$product.'.'.$role); + if($product=="presentation") + { + $this->currentVtUserRigths->add("reply_message"); + } + } + + function isInstructor(){ + if($this->hparams["role"]!=null && $this->hparams["role"]=="Instructor") + { + return true; + } + return false; + } + + function getFirstname(){ + + if(isset($this->hparams["firstname"])) + { + return $this->hparams["firstname"]; + } + return ""; + } + + function getEmail(){ + + if(isset($this->hparams["email"])) + { + return $this->hparams["email"]; + } + return ""; + } + function getLastname(){ + + if(isset($this->hparams["lastname"])) + { + return $this->hparams["lastname"]; + } + return ""; + } + +} + + + + + +?> \ No newline at end of file Added: trunk/src/main/php/integrations_common/php/common/WimbaLib.php =======... [truncated message content] |
From: <tro...@us...> - 2008-10-29 17:55:52
|
Revision: 260 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=260&view=rev Author: trollinger Date: 2008-10-29 17:55:46 +0000 (Wed, 29 Oct 2008) Log Message: ----------- update the branch with the last version of the code Modified Paths: -------------- branches/3.3_trunk/pom.xml branches/3.3_trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php branches/3.3_trunk/src/main/php/blocks/bvoiceemail/config_instance.html branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php branches/3.3_trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaCommons.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaLib.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaUI.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaXml.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCAction.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCRoom.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCUser.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/PrefixUtil.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/lcapi.php branches/3.3_trunk/src/main/php/integrations_common/php/vt/VtAction.php branches/3.3_trunk/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php branches/3.3_trunk/src/main/php/integrations_common/web/js/verifForm.js branches/3.3_trunk/src/main/php/integrations_common/web/js/wimba_ajax.js branches/3.3_trunk/src/main/php/integrations_common/web/js/wimba_commons.js branches/3.3_trunk/src/main/php/integrations_common/web/js/xsl/wimba.xsl branches/3.3_trunk/src/main/php/mod/liveclassroom/backuplib.php branches/3.3_trunk/src/main/php/mod/liveclassroom/config.html branches/3.3_trunk/src/main/php/mod/liveclassroom/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/liveclassroom/db/install.xml branches/3.3_trunk/src/main/php/mod/liveclassroom/generateXmlMainPanel.php branches/3.3_trunk/src/main/php/mod/liveclassroom/generateXmlSettingsPanel.php branches/3.3_trunk/src/main/php/mod/liveclassroom/icon.gif branches/3.3_trunk/src/main/php/mod/liveclassroom/index.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en_utf8/liveclassroom.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lib.php branches/3.3_trunk/src/main/php/mod/liveclassroom/manageAction.php branches/3.3_trunk/src/main/php/mod/liveclassroom/mod.html branches/3.3_trunk/src/main/php/mod/liveclassroom/reports.php branches/3.3_trunk/src/main/php/mod/liveclassroom/restorelib.php branches/3.3_trunk/src/main/php/mod/liveclassroom/version.php branches/3.3_trunk/src/main/php/mod/liveclassroom/view.php branches/3.3_trunk/src/main/php/mod/liveclassroom/welcome.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/backuplib.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voiceauthoring/db/install.xml branches/3.3_trunk/src/main/php/mod/voiceauthoring/displayPlayer.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/icon.gif branches/3.3_trunk/src/main/php/mod/voiceauthoring/index.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/en_utf8/voiceauthoring.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lib.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/manageActionBlock.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/mod.html branches/3.3_trunk/src/main/php/mod/voiceauthoring/restorelib.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/version.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/view.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/voiceauthoring.php branches/3.3_trunk/src/main/php/mod/voiceemail/block.php branches/3.3_trunk/src/main/php/mod/voiceemail/block_config.php branches/3.3_trunk/src/main/php/mod/voiceemail/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voiceemail/db/install.xml branches/3.3_trunk/src/main/php/mod/voiceemail/db/postgres7.php branches/3.3_trunk/src/main/php/mod/voiceemail/icon.gif branches/3.3_trunk/src/main/php/mod/voiceemail/index.php branches/3.3_trunk/src/main/php/mod/voiceemail/lang/en_utf8/voiceemail.php branches/3.3_trunk/src/main/php/mod/voiceemail/lib.php branches/3.3_trunk/src/main/php/mod/voiceemail/manageActionBlock.php branches/3.3_trunk/src/main/php/mod/voiceemail/mod.html branches/3.3_trunk/src/main/php/mod/voiceemail/version.php branches/3.3_trunk/src/main/php/mod/voiceemail/view.php branches/3.3_trunk/src/main/php/mod/voicetools/config.html branches/3.3_trunk/src/main/php/mod/voicetools/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voicetools/db/mysql.sql branches/3.3_trunk/src/main/php/mod/voicetools/db/postgres7.sql branches/3.3_trunk/src/main/php/mod/voicetools/db/upgrade.php branches/3.3_trunk/src/main/php/mod/voicetools/lang/en_utf8/voicetools.php branches/3.3_trunk/src/main/php/mod/voicetools/testConfig.php branches/3.3_trunk/src/main/php/mod/voicetools/version.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/install.xml branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/mysql.sql branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/postgres7.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/generateXmlMainPanel.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/generateXmlSettingsPanel.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/index.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/lang/english_bundle.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/lib.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/mod.html branches/3.3_trunk/src/main/php/mod/voicetools_generic/version.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/view.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/welcome.php Added Paths: ----------- branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/config_instance.html branches/3.3_trunk/src/main/php/integrations_common/web/pictures/buttons/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/buttons/flat/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/buttons/flat/close/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/buttons/flat/close/x_round-16_14.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/Wlogo-W_only-60.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-available_selected.jpg branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-info.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-information-16_12.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-unavailable_selected.jpg branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/phone_32.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/speaker-18.gif branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/wheel-24.gif branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/wimba_sound.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/x_round-16_14.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/module_tab/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/module_tab/module_tab-left.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/module_tab/module_tab-right.png branches/3.3_trunk/src/main/php/mod/liveclassroom/db/access.php branches/3.3_trunk/src/main/php/mod/liveclassroom/db/upgrade.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/block_config.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/displayActivityName.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/displayWysiwyg.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/enableVA.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/error.php branches/3.3_trunk/src/main/php/mod/voiceemail/backuplib.php branches/3.3_trunk/src/main/php/mod/voiceemail/restorelib.php branches/3.3_trunk/src/main/php/mod/voicetools/defaults.php branches/3.3_trunk/src/main/php/mod/voicetools/icon.gif branches/3.3_trunk/src/main/php/mod/voicetools/lib.php branches/3.3_trunk/src/main/php/mod/voicetools/mod.html branches/3.3_trunk/src/main/php/mod/voicetools_generic/backuplib.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/restorelib.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/voiceboard.png branches/3.3_trunk/src/main/php/mod/voicetools_generic/voicepodcaster.png branches/3.3_trunk/src/main/php/mod/voicetools_generic/voicepresentation.png branches/3.3_trunk/wysiwyg/ branches/3.3_trunk/wysiwyg/images/ branches/3.3_trunk/wysiwyg/images/wimba.gif branches/3.3_trunk/wysiwyg/images/wimba_sound.png branches/3.3_trunk/wysiwyg/lib/ branches/3.3_trunk/wysiwyg/lib/editor/ branches/3.3_trunk/wysiwyg/lib/editor/htmlarea/ branches/3.3_trunk/wysiwyg/lib/editor/htmlarea/htmlarea.php branches/3.3_trunk/wysiwyg/lib/weblib.php branches/3.3_trunk/wysiwyg/popups/ branches/3.3_trunk/wysiwyg/popups/insert_wimba.php branches/3.3_trunk/wysiwyg/wimba.patch Modified: branches/3.3_trunk/pom.xml =================================================================== --- branches/3.3_trunk/pom.xml 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/pom.xml 2008-10-29 17:55:46 UTC (rev 260) @@ -1,10 +1,9 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>wimba.integrations.moodle.vt-lc</groupId> <artifactId>wimba-moodle</artifactId> <name>Wimba moodle</name> - <version>3.2-SNAPSHOT</version> + <version>3.3.0</version> <!-- The following blocks "repositories" and "profiles" should be present in all our pom.xml --> <!-- artifactory (FR) location --> @@ -27,9 +26,8 @@ </repository> </repositories> </profile> - </profiles> + </profiles> - <build> <plugins> <plugin> @@ -43,181 +41,160 @@ <copy todir="${project.build.directory}/generated-sources/mod/voiceboard" overwrite="true"> <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> <exclude name="**/*bundle*" /> - <exclude name="**/*help*" /> + <exclude name="**/*help*" /> </fileset> <filterset> - - <filter token="MODULE_NAME" value="voiceboard"/> - <filter token="SHORT_NAME" value="board"/> - <filter token="COMPLETE_NAME" value="Voice Board"/> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> </filterset> </copy> - + <copy todir="${project.build.directory}/generated-sources/mod/voicepodcaster" overwrite="true"> <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> <exclude name="**/*bundle*" /> - <exclude name="**/*help*" /> + <exclude name="**/*help*" /> </fileset> <filterset> - <filter token="MODULE_NAME" value="voicepodcaster"/> - <filter token="SHORT_NAME" value="pc"/> - <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> </filterset> </copy> - + <copy todir="${project.build.directory}/generated-sources/mod/voicepresentation" overwrite="true"> <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> <exclude name="**/*bundle*" /> - <exclude name="**/*help*" /> + <exclude name="**/*help*" /> </fileset> <filterset> - <filter token="MODULE_NAME" value="voicepresentation"/> - <filter token="SHORT_NAME" value="presentation"/> - <filter token="COMPLETE_NAME" value="Voice Presentation"/> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> </filterset> </copy> - - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/voiceboard.php"> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/voiceboard.php"> <filterset> - <filter token="MODULE_NAME" value="voiceboard"/> - <filter token="SHORT_NAME" value="board"/> - <filter token="COMPLETE_NAME" value="Voice Board"/> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/voiceboard.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/voiceboard.php"> <filterset> - <filter token="MODULE_NAME" value="voiceboard"/> - <filter token="SHORT_NAME" value="board"/> - <filter token="COMPLETE_NAME" value="Voice Board"/> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/voicepodcaster.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/voicepodcaster.php"> <filterset> - <filter token="MODULE_NAME" value="voicepodcaster"/> - <filter token="SHORT_NAME" value="pc"/> - <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/voicepodcaster.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/voicepodcaster.php"> <filterset> - <filter token="MODULE_NAME" value="voicepodcaster"/> - <filter token="SHORT_NAME" value="pc"/> - <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/voicepresentation.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/voicepresentation.php"> <filterset> - <filter token="MODULE_NAME" value="voicepresentation"/> - <filter token="SHORT_NAME" value="presentation"/> - <filter token="COMPLETE_NAME" value="Voice Presentation"/> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/voicepresentation.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/voicepresentation.php"> <filterset> - <filter token="MODULE_NAME" value="voicepresentation"/> - <filter token="SHORT_NAME" value="presentation"/> - <filter token="COMPLETE_NAME" value="Voice Presentation"/> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/voiceboard.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/voiceboard.php"> <filterset> - <filter token="MODULE_NAME" value="voiceboard"/> - <filter token="SHORT_NAME" value="board"/> - <filter token="COMPLETE_NAME" value="Voice Board"/> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/voiceboard.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/voiceboard.php"> <filterset> - <filter token="MODULE_NAME" value="voiceboard"/> - <filter token="SHORT_NAME" value="board"/> - <filter token="COMPLETE_NAME" value="Voice Board"/> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/voicepodcaster.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/voicepodcaster.php"> <filterset> - <filter token="MODULE_NAME" value="voicepodcaster"/> - <filter token="SHORT_NAME" value="pc"/> - <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/voicepodcaster.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/voicepodcaster.php"> <filterset> - <filter token="MODULE_NAME" value="voicepodcaster"/> - <filter token="SHORT_NAME" value="pc"/> - <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/voicepresentation.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/voicepresentation.php"> <filterset> - <filter token="MODULE_NAME" value="voicepresentation"/> - <filter token="SHORT_NAME" value="presentation"/> - <filter token="COMPLETE_NAME" value="Voice Presentation"/> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/voicepresentation.php"> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/voicepresentation.php"> <filterset> - <filter token="MODULE_NAME" value="voicepresentation"/> - <filter token="SHORT_NAME" value="presentation"/> - <filter token="COMPLETE_NAME" value="Voice Presentation"/> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/help/voiceboard/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/help/voiceboard/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/help/voicepodcaster/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/help/voicepodcaster/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/help/voicepresentation/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/help/voicepresentation/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/help/voicepresentation/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/help/voicepresentation/mods.html" /> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/help/voiceboard/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" - tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/help/voiceboard/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/help/voicepodcaster/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/help/voicepodcaster/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/help/voicepresentation/mods.html"/> - <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" - tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/help/voicepresentation/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/help/voiceboard/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/help/voicepodcaster/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/help/voicepresentation/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/help/voicepresentation/mods.html" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/voicepresentation.png" tofile="${project.build.directory}/generated-sources/mod/voicepresentation/icon.gif" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/voiceboard.png" tofile="${project.build.directory}/generated-sources/mod/voiceboard/icon.gif" /> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/voicepodcaster.png" tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/icon.gif" /> + <copy todir="${project.build.directory}/generated-sources/mod/voicepodcaster/lib" overwrite="true"> <fileset dir="${basedir}/src/main/php/integrations_common"> </fileset> <filterset> - <filter token="MODULE_NAME" value="voicepodcaster"/> - <filter token="SHORT_NAME" value="pc"/> - <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + <filter token="MODULE_NAME" value="voicepodcaster" /> + <filter token="SHORT_NAME" value="pc" /> + <filter token="COMPLETE_NAME" value="Voice Podcaster" /> </filterset> </copy> @@ -225,9 +202,9 @@ <fileset dir="${basedir}/src/main/php/integrations_common"> </fileset> <filterset> - <filter token="MODULE_NAME" value="voicepresentation"/> - <filter token="SHORT_NAME" value="presentation"/> - <filter token="COMPLETE_NAME" value="Voice Presentation"/> + <filter token="MODULE_NAME" value="voicepresentation" /> + <filter token="SHORT_NAME" value="presentation" /> + <filter token="COMPLETE_NAME" value="Voice Presentation" /> </filterset> </copy> @@ -235,9 +212,9 @@ <fileset dir="${basedir}/src/main/php/integrations_common"> </fileset> <filterset> - <filter token="MODULE_NAME" value="voiceboard"/> - <filter token="SHORT_NAME" value="board"/> - <filter token="COMPLETE_NAME" value="Voice Board"/> + <filter token="MODULE_NAME" value="voiceboard" /> + <filter token="SHORT_NAME" value="board" /> + <filter token="COMPLETE_NAME" value="Voice Board" /> </filterset> </copy> @@ -245,9 +222,9 @@ <fileset dir="${basedir}/src/main/php/integrations_common"> </fileset> <filterset> - <filter token="MODULE_NAME" value="liveclassroom"/> - <filter token="SHORT_NAME" value="lc"/> - <filter token="COMPLETE_NAME" value="Wimba Classroom"/> + <filter token="MODULE_NAME" value="liveclassroom" /> + <filter token="SHORT_NAME" value="lc" /> + <filter token="COMPLETE_NAME" value="Wimba Classroom" /> </filterset> </copy> @@ -255,9 +232,9 @@ <fileset dir="${basedir}/src/main/php/integrations_common"> </fileset> <filterset> - <filter token="MODULE_NAME" value="voiceemail"/> - <filter token="SHORT_NAME" value="vmail"/> - <filter token="COMPLETE_NAME" value="Voice Email"/> + <filter token="MODULE_NAME" value="voiceemail" /> + <filter token="SHORT_NAME" value="vmail" /> + <filter token="COMPLETE_NAME" value="Voice Email" /> </filterset> </copy> @@ -265,19 +242,16 @@ <fileset dir="${basedir}/src/main/php/integrations_common"> </fileset> <filterset> - <filter token="MODULE_NAME" value="voiceauthoring"/> - <filter token="SHORT_NAME" value="recorder"/> - <filter token="COMPLETE_NAME" value="Voice Authoring"/> + <filter token="MODULE_NAME" value="voiceauthoring" /> + <filter token="SHORT_NAME" value="recorder" /> + <filter token="COMPLETE_NAME" value="Voice Authoring" /> </filterset> </copy> - <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php" - tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetoolsAPI.php"/> - <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetools.php" - tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetools.php"/> - <copy file="${basedir}/src/main/php/integrations_common/php/common/WimbaLib.php" - tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/common/WimbaLib.php"/> + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetoolsAPI.php" /> + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetools.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetools.php" /> + <copy file="${basedir}/src/main/php/integrations_common/php/common/WimbaLib.php" tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/common/WimbaLib.php" /> <copy todir="${project.build.directory}/generated-sources/mod/voicetools/lib/web" overwrite="true"> <fileset dir="${basedir}/src/main/php/integrations_common/web"> Modified: branches/3.3_trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php =================================================================== --- branches/3.3_trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php 2008-10-29 17:55:46 UTC (rev 260) @@ -41,7 +41,7 @@ } function instance_allow_multiple() { - return false; + return true; } Modified: branches/3.3_trunk/src/main/php/blocks/bvoiceemail/config_instance.html =================================================================== --- branches/3.3_trunk/src/main/php/blocks/bvoiceemail/config_instance.html 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/blocks/bvoiceemail/config_instance.html 2008-10-29 17:55:46 UTC (rev 260) @@ -2,8 +2,8 @@ global $COURSE; ?> +<div align="center"> +<iframe width="750px" align="center" height="300px" src="<?php echo $CFG->wwwroot;?>/mod/voiceemail/block_config.php?course_id=<?php echo $COURSE->id?>&block_id=<?php echo $this->instance->id?>" style="overflow:hidden" FRAMEBORDER="0"></iframe> +</div> -<iframe width="900px" height="300px" src="<?php echo $CFG->wwwroot;?>/mod/voiceemail/block_config.php?course_id=<?php echo $COURSE->id?>&block_id=<?php echo $this->instance->id?>" style="overflow:hidden" FRAMEBORDER="0"></iframe> - - Added: branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php =================================================================== --- branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php (rev 0) +++ branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoiceemail.php 2008-10-29 17:55:46 UTC (rev 260) @@ -0,0 +1,58 @@ +<?PHP + +require_once($CFG->libdir.'/datalib.php'); + +class block_bvoiceemail extends block_base { + + function init() { + $this->title = "Voice E-Mail"; + $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/voiceemail/block.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="220px" height="150px"></iframe>'; + $this->content->text .= '</td></tr>'; + $this->content->text .= '</table>'; + + return $this->content; + } + + function instance_allow_multiple() { + return false; + } + + + function instance_allow_config() { + return true; + } + function has_config() { + return true; + } + +} + + +?> \ No newline at end of file Modified: branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php =================================================================== --- branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php 2008-10-29 17:55:46 UTC (rev 260) @@ -1,23 +1,31 @@ <?PHP + require_once($CFG->libdir.'/datalib.php'); + class block_bvoicerecorder extends block_base { function init() { + $this->title = "Voice Authoring"; - $this->version = 2004111200; + $this->version = 2008111200; } + + function specialization() { + $block_info = get_record("voiceauthoring_block","bid",$this->instance->id); + $this->title = isset($block_info->title) ? format_string($block_info->title) : format_string("Voice Authoring"); + } function preferred_width() { - return 220; + return 215 ; } function applicable_formats() { - - return array('site-index' => false, - 'course-view' => true - ); + + return array('site-index' => false, + 'course-view' => true + ); } @@ -36,14 +44,13 @@ $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/voiceauthoring/ - voiceauthoring.php?course_id='. $COURSE->id. + $this->content->text .= '<tr><td align="center">'; + $this->content->text .= '<iframe src='.$CFG->wwwroot.'/mod/voiceauthoring/voiceauthoring.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>'; + 'name="frameWidget" style="overflow:hidden;margin-top:-10px" + FRAMEBORDER=0 width="215px" height="150px"></iframe>'; + + $this->content->text .= '</td></tr>'; $this->content->text .= '</table>'; @@ -65,4 +72,5 @@ } -?> \ No newline at end of file +?> + Added: branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/config_instance.html =================================================================== --- branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/config_instance.html (rev 0) +++ branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/config_instance.html 2008-10-29 17:55:46 UTC (rev 260) @@ -0,0 +1,9 @@ +<?php +global $COURSE; + +?> +<div align="center"> +<iframe width="750px" align="center" height="300px" src="<?php echo $CFG->wwwroot;?>/mod/voiceauthoring/block_config.php?course_id=<?php echo $COURSE->id?>&block_id=<?php echo $this->instance->id?>" style="overflow:hidden" FRAMEBORDER="0"></iframe> +</div> + + Modified: branches/3.3_trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php =================================================================== --- branches/3.3_trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php 2008-10-29 17:55:46 UTC (rev 260) @@ -63,7 +63,7 @@ return @MODULE_NAME@_store_new_element($voicetools); } -function storeVmailResource($rid,$course_id, $block_id='-1') +function storeVmailResource($rid,$course_id, $block_id='0') { $voicetools = new Object(); @@ -169,4 +169,9 @@ return $preview; } + + + + + ?> \ No newline at end of file Modified: branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaCommons.php =================================================================== --- branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaCommons.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaCommons.php 2008-10-29 17:55:46 UTC (rev 260) @@ -43,7 +43,7 @@ $this->timeOfLoad = time(); $signature=""; $this->request=$parameters; - if (($this->timeOfLoad - $parameters["time"] <= 1800) && ($this->timeOfLoad - $parameters["time"] >= 0)) + if (($this->timeOfLoad - $parameters["time"] <= 10) && ($this->timeOfLoad - $parameters["time"] >= 0)) {//30 min ksort($parameters); foreach ($parameters as $key => $value) Modified: branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaLib.php =================================================================== --- branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaLib.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaLib.php 2008-10-29 17:55:46 UTC (rev 260) @@ -14,8 +14,8 @@ return array( array("value" => "enc_course_id", "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_firstname", "type" => PARAM_CLEAN, "default_value" => null), + array("value" => "enc_lastname", "type" => PARAM_CLEAN, "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), @@ -26,7 +26,7 @@ array("value" => "resource_id", "type" => PARAM_CLEAN, "default_value" => "0"), array("value" => "error", "type" => PARAM_CLEAN, "default_value" => ""), array("value" => "messageAction", "type" => PARAM_CLEAN, "default_value" => ""), - array("value" => "messageProduct", "type" => PARAM_CLEAN, "default_value" => "") + array("value" => "messageProduct", "type" => PARAM_CLEAN, "default_value" => ""), ); } @@ -37,7 +37,7 @@ array("value" => "description", "type" => PARAM_CLEAN, "default_value" => ""), 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" => "10"), + 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"), @@ -45,7 +45,7 @@ array("value" => "archiveEnabled", "type" => PARAM_BOOL, "default_value" => "0"), array("value" => "enabled_student_eboard", "type" => PARAM_BOOL, "default_value" => "0"), array("value" => "enabled_students_breakoutrooms", "type" => PARAM_BOOL, "default_value" => "0"), - array("value" => "enabled_students_mainrooms", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "enabled_students_mainrooms", "type" => PARAM_BOOL, "default_value" => "0"), array("value" => "enabled_status", "type" => PARAM_BOOL, "default_value" => "0"), array("value" => "appshareEnabled", "type" => PARAM_BOOL, "default_value" => "0"), array("value" => "pptEnabled", "type" => PARAM_BOOL, "default_value" => "0"), Modified: branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaUI.php =================================================================== --- branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaUI.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaUI.php 2008-10-29 17:55:46 UTC (rev 260) @@ -335,7 +335,7 @@ } else {//problem to get the vt resource - wimba_add_log(WIMBA_INFO,WV,"No xxxxxxx have been created yet"); + wimba_add_log(WIMBA_INFO,WV,"No resource have been created yet"); $this->xml->setError(get_string("error_connection_vt", "@MODULE_NAME@")); } @@ -909,13 +909,13 @@ $this->xml->addSimpleLineElement("label", get_string("settings_enabled_student_eboard", 'liveclassroom')); - if($this->isLectureRoom) + if($this->isLectureRoom === true) { $this->xml->createLine("subPart","lectureRoom"); } else { - $this->xml->createLine("subPart HideElement","lectureRoom"); + $this->xml->createLine("subPart hideElement","lectureRoom"); } $this->xml->addSimpleLineElement("label", @@ -938,13 +938,13 @@ "label", get_string("settings_enabled_breakoutrooms", 'liveclassroom')); - if($this->isLectureRoom) + if($this->isLectureRoom === true) { $this->xml->createLine("subPart","lectureRoom"); } else { - $this->xml->createLine("subPart HideElement","lectureRoom"); + $this->xml->createLine("subPart hideElement","lectureRoom"); } $parameters = array ( @@ -972,13 +972,13 @@ "label", get_string("settings_enabled_students_breakoutrooms", 'liveclassroom')); - if($this->isLectureRoom) + if($this->isLectureRoom === true) { $this->xml->createLine("","lectureRoom"); } else { - $this->xml->createLine("HideElement","lectureRoom"); + $this->xml->createLine("hideElement","lectureRoom"); } $parameters = array ( @@ -1013,7 +1013,7 @@ } else { - $this->xml->createLine("HideElement","lectureRoom"); + $this->xml->createLine("hideElement","lectureRoom"); } $this->xml->addSimpleLineElement( @@ -1455,7 +1455,7 @@ $parameters = array ( "type" => "button", "value" => get_string("settings_advanced_room_settings_button",'liveclassroom'), - "onclick" => "openRoomSettings('doAction.php')" + "onclick" => "openRoomSettings('manageAction.php')" ); $this->xml->addInputElement($parameters); @@ -1588,7 +1588,8 @@ "type" => "checkbox", "value" => "true", "id" => "show_compose", - "name" => "show_compose" + "name" => "show_compose", + "class" =>"AlignRight" ); if (!isset ($this->currentObject)) { @@ -1861,7 +1862,7 @@ "name" => "show_reply", "class" => "Padding_50px" ); - if (isset ($this->currentObject) && $this->currentObjectOptions->getShowReply() == 'true') + if (!isset ($this->currentObject) || $this->currentObjectOptions->getShowReply() == 'true') { $parameters['checked'] = "true"; } @@ -2756,7 +2757,7 @@ $this->session->url_params . "&time=" . time() . "&action=launch"); $xmlResource->setTooltipAvailability(get_string("tooltipVT_" . $preview . "_student", '@MODULE_NAME@')); - if ($this->session->isInstructor() || !$this->session->isInstructor() && $preview == true) + if ($this->session->isInstructor() || !$this->session->isInstructor() && $preview === true) { $xmlResource->setType($resource->getType()); $resources[$resource->getTitle() . $resource->getRid()] = $xmlResource; Modified: branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaXml.php =================================================================== --- branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaXml.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaXml.php 2008-10-29 17:55:46 UTC (rev 260) @@ -28,7 +28,8 @@ /* $Id: $ */ -class WimbaXml{ +class WimbaXml +{ var $xmldoc; var $part=array(); //contains the different part of the UI var $linePart=array(); @@ -277,7 +278,7 @@ $elementBrowser->append_child($this->xmldoc->create_text_node($browser)); $disable = $this->xmldoc->create_element("disabled"); - $disable->append_child($this->xmldoc->create_text_node($disabled)); + $disable->append_child($this->xmldoc->create_text_node($disable)); $hbinstructorview = $this->xmldoc->create_element("instructorView"); $hbinstructorview->append_child($this->xmldoc->create_text_node(get_string('instructorview', 'voiceboard'))); $hbstudentview = $this->xmldoc->create_element("studentView"); Modified: branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCAction.php =================================================================== --- branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCAction.php 2008-09-03 00:51:27 UTC (rev 259) +++ branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCAction.php 2008-10-29 17:55:46 UTC (rev 260) @@ -27,23 +27,29 @@ ******************************************************************************/ require_once ("LCUser.php"); +require_once("PrefixUtil.php"); class LCAction { var $session = null; var $api = null; + var $prefixUtil =null; var $server = ""; var $adminName = ""; var $adminPass = ""; var $courseId = ""; var $login = ""; var $prefix = ""; + function LCAction($session, $server, $login, $password, $path, $courseId = "") { $this->session = $session; - - $this->api = LCApi::getInstance($server, $login, $password, $path); + + $this->prefixUtil = new PrefixUtil(); + $this->prefix = $this->prefixUtil->getPrefix($login); + + $this->api = LCApi::getInstance($server, $login, $password,$this->prefix, $path); if (isset ($this->session)) { $this->courseId = $this->session->getCourseId(); @@ -53,8 +59,9 @@ $this->courseId = $courseId; } $this->server = $server; - $this->prefix = getPrefix($login); - $this->createFirstTime(); + + //create the user of the course + $this->createFirstTime(); } @@ -74,17 +81,16 @@ function createFirstTime() { - if ($this->api->lcapi_get_users($this->getStudentUserid()) == false) + if ($this->api->lcapi_get_users($this->getStudentUserid()) === false) { // create the two users $this->api->lcapi_create_user($this->getStudentUserid()); + } + + if ($this->api->lcapi_get_users($this->getTeacherUserid()) === false) + { + // create the two users $this->api->lcapi_create_user($this->getTeacherUserid()); - // teacher is the lead of the presentation - // $this->createSimpleRoom("Main Room", true, $this->courseId); - // teachers and students have the same rigth - // $this->createSimpleRoom("Group 1", false, $this->courseId); - // $this->createSimpleRoom("Group 2", false, $this->courseId); - // $this->createSimpleRoom("Group 3", false, $this->courseId); } } @@ -240,7 +246,7 @@ function createSimpleRoom($longname, $lecture, $courseId) { // room - $id = $this->prefix . $courseId . rand(); + $id = $courseId . rand(); $room = new LCRoom(); $room->setArguments($id, null, $longname, null, "0", "0"); @@ -266,6 +272,7 @@ } function getRoom($roomid) { + $this->prefixUtil->trimPrefix($roomid,$this->prefix); return $this->api->lcapi_get_room_info($roomid); } @@ -344,33 +351,57 @@ $this->api->lcapi_modify_room($roomId, $room->getAttributes()); } - function cloneRoom($course_id,$roomId, $UserData = "0", $isStudentAdmin, $preview ) + function removeRole($roomId,$userId,$typeRole) { - $newId=$roomId."_".rand()."_c"; + $roomId = $this->prefixUtil->trimPrefix($roomId,$this->prefix); + $this->api->lcapi_remove_user_role($roomId,$userId,$typeRole); + } + function cloneRoom($course_id,$roomId, $userData = "0", $isStudentAdmin, $preview ) + { + $newId = "c".rand(); + $oldIdWithoutPrefix = $this->prefixUtil->trimPrefix($roomId,$this->prefix); + if( $userData=="1" ) { - $this->api->lcapi_clone_class($roomId, $newId); + $this->api->lcapi_clone_class($oldIdWithoutPrefix, $newId); } else { - $this->api->lcapi_clone_class($roomId, $newId,"1"); + $this->api->lcapi_clone_class($oldIdWithoutPrefix, $newId,"1"); } - $this->setRoomPreview($newId,$preview); + + if(empty($preview))//preview is empty for the available room + { + $preview = "0"; + } + + $this->setRoomPreview($newId,$preview); - if ($isStudentAdmin == "true") - { // instructor lead the presentation - $this->api->lcapi_add_user_role($newId, $this->getStudentUserid(), "Student"); - $this->api->lcapi_add_user_role($newId, $this->getTeacherUserid(), "ClassAdmin"); - } - else - { - $this->api->lcapi_add_user_role($newId, $this->getStudentUserid(), "Instructor"); - $this->api->lcapi_add_user_role($newId, $this->getTeacherUserid(), "ClassAdmin"); - } - return $newId; + if ($isStudentAdmin == "true") + { // instructor lead the presentation + $this->api->lcapi_add_user_role($newId, $course_id."_S", "Student"); + $this->api->lcapi_add_user_role($newId, $course_id."_T", "ClassAdmin"); + } + else + { + $this->api->lcapi_add_user_role($newId, $course_id."_S", "Instructor"); + $this->api->lcapi_add_user_role($newId, $course_id."_T", "ClassAdmin"); + } + return $newId; } + function getVersion() + { + $config=$this->api->lcapi_get_status(); + $version=$config["horizon_version"]; + if(empty($version)) + { + $version="Unknown"; + } + return $version; + } } + ?> Modified: branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCRoom.php =================================================================== --- branch... [truncated message content] |
From: <tro...@us...> - 2008-09-03 00:52:03
|
Revision: 259 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=259&view=rev Author: trollinger Date: 2008-09-03 00:51:27 +0000 (Wed, 03 Sep 2008) Log Message: ----------- Commit the current 3.3 trunk Added Paths: ----------- branches/3.3_trunk/ branches/3.3_trunk/INSTALL.txt branches/3.3_trunk/LICENSE.txt branches/3.3_trunk/README.txt branches/3.3_trunk/pom.xml branches/3.3_trunk/src/ branches/3.3_trunk/src/main/ branches/3.3_trunk/src/main/assembly/ branches/3.3_trunk/src/main/assembly/descriptor.xml branches/3.3_trunk/src/main/php/ branches/3.3_trunk/src/main/php/.cache/ branches/3.3_trunk/src/main/php/.cache/.dataModel branches/3.3_trunk/src/main/php/.project branches/3.3_trunk/src/main/php/.settings/ branches/3.3_trunk/src/main/php/.settings/org.eclipse.php.core.projectOptions.prefs branches/3.3_trunk/src/main/php/blocks/ branches/3.3_trunk/src/main/php/blocks/bliveclassroom/ branches/3.3_trunk/src/main/php/blocks/bliveclassroom/block_bliveclassroom.php branches/3.3_trunk/src/main/php/blocks/bliveclassroom/config_global.html branches/3.3_trunk/src/main/php/blocks/bvoiceemail/ branches/3.3_trunk/src/main/php/blocks/bvoiceemail/block_bvoiceemail.php branches/3.3_trunk/src/main/php/blocks/bvoiceemail/config_instance.html branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/ branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/block_bvoicerecorder.php branches/3.3_trunk/src/main/php/blocks/bvoicerecorder/config_global.html branches/3.3_trunk/src/main/php/integrations_common/ branches/3.3_trunk/src/main/php/integrations_common/php/ branches/3.3_trunk/src/main/php/integrations_common/php/common/ branches/3.3_trunk/src/main/php/integrations_common/php/common/DatabaseManagement.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaCommons.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaLib.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaUI.php branches/3.3_trunk/src/main/php/integrations_common/php/common/WimbaXml.php branches/3.3_trunk/src/main/php/integrations_common/php/common/XmlArchive.php branches/3.3_trunk/src/main/php/integrations_common/php/common/XmlOrphanedArchive.php branches/3.3_trunk/src/main/php/integrations_common/php/common/XmlResource.php branches/3.3_trunk/src/main/php/integrations_common/php/common/XmlRoom.php branches/3.3_trunk/src/main/php/integrations_common/php/common/domxml-php4-php5.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/ branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCAction.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCRoom.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/LCUser.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/PrefixUtil.php branches/3.3_trunk/src/main/php/integrations_common/php/lc/file.txt branches/3.3_trunk/src/main/php/integrations_common/php/lc/lcapi.php branches/3.3_trunk/src/main/php/integrations_common/php/vt/ branches/3.3_trunk/src/main/php/integrations_common/php/vt/VtAction.php branches/3.3_trunk/src/main/php/integrations_common/php/vt/WimbaVoicetools.php branches/3.3_trunk/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php branches/3.3_trunk/src/main/php/integrations_common/web/ branches/3.3_trunk/src/main/php/integrations_common/web/js/ branches/3.3_trunk/src/main/php/integrations_common/web/js/constants.js branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/ branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/AUTHORS branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/COPYING branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/README branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/dom.js branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/util.js branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/xmltoken.js branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/xpath.js branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/ajaxslt/xslt.js branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/iepngfix/ branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/iepngfix/iepngfix.htc branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/iepngfix/iepngfix_tilebg.js branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/prototype/ branches/3.3_trunk/src/main/php/integrations_common/web/js/lib/prototype/prototype.js branches/3.3_trunk/src/main/php/integrations_common/web/js/md5.inc branches/3.3_trunk/src/main/php/integrations_common/web/js/verifForm.js branches/3.3_trunk/src/main/php/integrations_common/web/js/wimba_ajax.js branches/3.3_trunk/src/main/php/integrations_common/web/js/wimba_commons.js branches/3.3_trunk/src/main/php/integrations_common/web/js/xsl/ branches/3.3_trunk/src/main/php/integrations_common/web/js/xsl/wimba.xsl branches/3.3_trunk/src/main/php/integrations_common/web/pictures/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/backgrounds/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/backgrounds/filterbar.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/backgrounds/headerbar.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/backgrounds/toolbar.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/box/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-bottom-left.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-bottom-right.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-top-left.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/box/no_shadow/400/box-top-right.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/headerbar-logo.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-available.jpg branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-available.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-hide.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-show.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-subitem-selected.jpg branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-subitem.jpg branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-unavailable.jpg branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/listitem-unavailable.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/messagelabel-info.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/phone_60.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/warning.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/items/yes-60.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/regular_btn/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/regular_btn/regular_btn-left.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/regular_btn/regular_btn-right.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/regular_btn/regular_btn-submit.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/search/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/search/search-left.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/search/search-right.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/search/x_round-16_12-over.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/search/x_round-16_12.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/tabs/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/tabs/tab-left.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/tabs/tab-right.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/ branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/add_activity.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/content.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/delete.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/launch.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/new.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/reports.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/settings.png branches/3.3_trunk/src/main/php/integrations_common/web/pictures/toolbar_btn/squared_btn.png branches/3.3_trunk/src/main/php/mod/ branches/3.3_trunk/src/main/php/mod/liveclassroom/ branches/3.3_trunk/src/main/php/mod/liveclassroom/access.php branches/3.3_trunk/src/main/php/mod/liveclassroom/backuplib.php branches/3.3_trunk/src/main/php/mod/liveclassroom/config.html branches/3.3_trunk/src/main/php/mod/liveclassroom/css/ branches/3.3_trunk/src/main/php/mod/liveclassroom/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/liveclassroom/db/ branches/3.3_trunk/src/main/php/mod/liveclassroom/db/install.xml branches/3.3_trunk/src/main/php/mod/liveclassroom/db/migrate2utf8.php branches/3.3_trunk/src/main/php/mod/liveclassroom/db/migrate2utf8.xml branches/3.3_trunk/src/main/php/mod/liveclassroom/db/mysql.php branches/3.3_trunk/src/main/php/mod/liveclassroom/db/mysql.sql branches/3.3_trunk/src/main/php/mod/liveclassroom/db/postgres7.php branches/3.3_trunk/src/main/php/mod/liveclassroom/db/postgres7.sql branches/3.3_trunk/src/main/php/mod/liveclassroom/generateXmlMainPanel.php branches/3.3_trunk/src/main/php/mod/liveclassroom/generateXmlSettingsPanel.php branches/3.3_trunk/src/main/php/mod/liveclassroom/icon.gif branches/3.3_trunk/src/main/php/mod/liveclassroom/index.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en/help/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en/help/liveclassroom/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en/help/liveclassroom/mods.html branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en/liveclassroom.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en_utf8/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en_utf8/block_bliveclassroom.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en_utf8/help/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en_utf8/help/liveclassroom/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en_utf8/help/liveclassroom/mods.html branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/en_utf8/liveclassroom.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr/help/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr/help/liveclassroom/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr/help/liveclassroom/mods.html branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr/liveclassroom.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/help/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/help/liveclassroom/ branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/help/liveclassroom/mods.html branches/3.3_trunk/src/main/php/mod/liveclassroom/lang/fr_utf8/liveclassroom.php branches/3.3_trunk/src/main/php/mod/liveclassroom/lib.php branches/3.3_trunk/src/main/php/mod/liveclassroom/loglist.php branches/3.3_trunk/src/main/php/mod/liveclassroom/logs.php branches/3.3_trunk/src/main/php/mod/liveclassroom/manageAction.php branches/3.3_trunk/src/main/php/mod/liveclassroom/mod.html branches/3.3_trunk/src/main/php/mod/liveclassroom/reports.php branches/3.3_trunk/src/main/php/mod/liveclassroom/restorelib.php branches/3.3_trunk/src/main/php/mod/liveclassroom/version.php branches/3.3_trunk/src/main/php/mod/liveclassroom/view.php branches/3.3_trunk/src/main/php/mod/liveclassroom/welcome.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/backuplib.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/css/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voiceauthoring/db/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/db/install.xml branches/3.3_trunk/src/main/php/mod/voiceauthoring/db/mysql.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/db/mysql.sql branches/3.3_trunk/src/main/php/mod/voiceauthoring/db/postgres7.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/db/postgres7.sql branches/3.3_trunk/src/main/php/mod/voiceauthoring/displayPlayer.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/icon.gif branches/3.3_trunk/src/main/php/mod/voiceauthoring/index.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/en/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/en/voiceauthoring.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/en_utf8/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/en_utf8/voiceauthoring.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/fr/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/fr/voiceauthoring.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/fr_utf8/ branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/fr_utf8/version.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lang/fr_utf8/voiceauthoring.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/lib.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/manageActionBlock.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/mod.html branches/3.3_trunk/src/main/php/mod/voiceauthoring/restorelib.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/testIfAudioExist.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/version.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/view.php branches/3.3_trunk/src/main/php/mod/voiceauthoring/voiceauthoring.php branches/3.3_trunk/src/main/php/mod/voiceemail/ branches/3.3_trunk/src/main/php/mod/voiceemail/block.php branches/3.3_trunk/src/main/php/mod/voiceemail/block_config.php branches/3.3_trunk/src/main/php/mod/voiceemail/css/ branches/3.3_trunk/src/main/php/mod/voiceemail/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voiceemail/db/ branches/3.3_trunk/src/main/php/mod/voiceemail/db/access.php branches/3.3_trunk/src/main/php/mod/voiceemail/db/install.xml branches/3.3_trunk/src/main/php/mod/voiceemail/db/mysql.php branches/3.3_trunk/src/main/php/mod/voiceemail/db/mysql.sql branches/3.3_trunk/src/main/php/mod/voiceemail/db/postgres7.php branches/3.3_trunk/src/main/php/mod/voiceemail/db/postgres7.sql branches/3.3_trunk/src/main/php/mod/voiceemail/icon.gif branches/3.3_trunk/src/main/php/mod/voiceemail/index.php branches/3.3_trunk/src/main/php/mod/voiceemail/lang/ branches/3.3_trunk/src/main/php/mod/voiceemail/lang/en/ branches/3.3_trunk/src/main/php/mod/voiceemail/lang/en/voiceemail.php branches/3.3_trunk/src/main/php/mod/voiceemail/lang/en_utf8/ branches/3.3_trunk/src/main/php/mod/voiceemail/lang/en_utf8/voiceemail.php branches/3.3_trunk/src/main/php/mod/voiceemail/lang/fr/ branches/3.3_trunk/src/main/php/mod/voiceemail/lang/fr/voiceemail.php branches/3.3_trunk/src/main/php/mod/voiceemail/lang/fr_utf8/ branches/3.3_trunk/src/main/php/mod/voiceemail/lang/fr_utf8/voiceemail.php branches/3.3_trunk/src/main/php/mod/voiceemail/lib.php branches/3.3_trunk/src/main/php/mod/voiceemail/listAvailableRecipients.php branches/3.3_trunk/src/main/php/mod/voiceemail/manageActionBlock.php branches/3.3_trunk/src/main/php/mod/voiceemail/mod.html branches/3.3_trunk/src/main/php/mod/voiceemail/version.php branches/3.3_trunk/src/main/php/mod/voiceemail/view.php branches/3.3_trunk/src/main/php/mod/voicetools/ branches/3.3_trunk/src/main/php/mod/voicetools/config.html branches/3.3_trunk/src/main/php/mod/voicetools/css/ branches/3.3_trunk/src/main/php/mod/voicetools/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voicetools/db/ branches/3.3_trunk/src/main/php/mod/voicetools/db/mysql.php branches/3.3_trunk/src/main/php/mod/voicetools/db/mysql.sql branches/3.3_trunk/src/main/php/mod/voicetools/db/postgres7.php branches/3.3_trunk/src/main/php/mod/voicetools/db/postgres7.sql branches/3.3_trunk/src/main/php/mod/voicetools/db/upgrade.php branches/3.3_trunk/src/main/php/mod/voicetools/lang/ branches/3.3_trunk/src/main/php/mod/voicetools/lang/en/ branches/3.3_trunk/src/main/php/mod/voicetools/lang/en/voicetools.php branches/3.3_trunk/src/main/php/mod/voicetools/lang/en_utf8/ branches/3.3_trunk/src/main/php/mod/voicetools/lang/en_utf8/voicetools.php branches/3.3_trunk/src/main/php/mod/voicetools/lang/fr/ branches/3.3_trunk/src/main/php/mod/voicetools/lang/fr_utf8/ branches/3.3_trunk/src/main/php/mod/voicetools/loglist.php branches/3.3_trunk/src/main/php/mod/voicetools/logs.php branches/3.3_trunk/src/main/php/mod/voicetools/testConfig.php branches/3.3_trunk/src/main/php/mod/voicetools/version.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/ branches/3.3_trunk/src/main/php/mod/voicetools_generic/css/ branches/3.3_trunk/src/main/php/mod/voicetools_generic/css/StyleSheet.css branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/ branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/access.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/install.xml branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/mysql.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/mysql.sql branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/postgres7.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/db/postgres7.sql branches/3.3_trunk/src/main/php/mod/voicetools_generic/error.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/generateXmlMainPanel.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/generateXmlSettingsPanel.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/index.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/lang/ branches/3.3_trunk/src/main/php/mod/voicetools_generic/lang/english_bundle.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/lang/english_help.html branches/3.3_trunk/src/main/php/mod/voicetools_generic/lang/french_bundle.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/lang/french_help.html branches/3.3_trunk/src/main/php/mod/voicetools_generic/lib.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/logs.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/manageAction.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/manageActionBlock.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/mod.html branches/3.3_trunk/src/main/php/mod/voicetools_generic/version.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/view.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/voicerecorder.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/welcome.php branches/3.3_trunk/src/main/php/mod/voicetools_generic/wimba_podcaster.gif branches/3.3_trunk/src/main/php/mod/voicetools_generic/wimba_voice_board.gif branches/3.3_trunk/src/main/php/mod/voicetools_generic/wimba_voice_presentation.gif Added: branches/3.3_trunk/INSTALL.txt =================================================================== --- branches/3.3_trunk/INSTALL.txt (rev 0) +++ branches/3.3_trunk/INSTALL.txt 2008-09-03 00:51:27 UTC (rev 259) @@ -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: branches/3.3_trunk/LICENSE.txt =================================================================== --- branches/3.3_trunk/LICENSE.txt (rev 0) +++ branches/3.3_trunk/LICENSE.txt 2008-09-03 00:51:27 UTC (rev 259) @@ -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: branches/3.3_trunk/README.txt =================================================================== --- branches/3.3_trunk/README.txt (rev 0) +++ branches/3.3_trunk/README.txt 2008-09-03 00:51:27 UTC (rev 259) @@ -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: branches/3.3_trunk/pom.xml =================================================================== --- branches/3.3_trunk/pom.xml (rev 0) +++ branches/3.3_trunk/pom.xml 2008-09-03 00:51:27 UTC (rev 259) @@ -0,0 +1,340 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>wimba.integrations.moodle.vt-lc</groupId> + <artifactId>wimba-moodle</artifactId> + <name>Wimba moodle</name> + <version>3.2-SNAPSHOT</version> + + <!-- The following blocks "repositories" and "profiles" should be present in all our pom.xml --> + <!-- artifactory (FR) location --> + <repositories> + <repository> + <id>central</id> + <name>wimba artifactory (FR)</name> + <url>http://artifactoryfr.wimba.com/artifactory/repo</url> + </repository> + </repositories> + <profiles> + <!-- use this profile to download artifacts from NY repository --> + <profile> + <id>ny</id> + <repositories> + <repository> + <id>central</id> + <name>wimba artifactory (US)</name> + <url>http://artifactoryus.wimba.com/artifactory/repo</url> + </repository> + </repositories> + </profile> + </profiles> + + + <build> + <plugins> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>prepare-sources</id> + <phase>generate-sources</phase> + <configuration> + <tasks> + <copy todir="${project.build.directory}/generated-sources/mod/voiceboard" overwrite="true"> + <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> + <exclude name="**/*bundle*" /> + <exclude name="**/*help*" /> + </fileset> + <filterset> + + <filter token="MODULE_NAME" value="voiceboard"/> + <filter token="SHORT_NAME" value="board"/> + <filter token="COMPLETE_NAME" value="Voice Board"/> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepodcaster" overwrite="true"> + <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> + <exclude name="**/*bundle*" /> + <exclude name="**/*help*" /> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster"/> + <filter token="SHORT_NAME" value="pc"/> + <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepresentation" overwrite="true"> + <fileset dir="${basedir}/src/main/php/mod/voicetools_generic"> + <exclude name="**/*bundle*" /> + <exclude name="**/*help*" /> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation"/> + <filter token="SHORT_NAME" value="presentation"/> + <filter token="COMPLETE_NAME" value="Voice Presentation"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard"/> + <filter token="SHORT_NAME" value="board"/> + <filter token="COMPLETE_NAME" value="Voice Board"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard"/> + <filter token="SHORT_NAME" value="board"/> + <filter token="COMPLETE_NAME" value="Voice Board"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster"/> + <filter token="SHORT_NAME" value="pc"/> + <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster"/> + <filter token="SHORT_NAME" value="pc"/> + <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation"/> + <filter token="SHORT_NAME" value="presentation"/> + <filter token="COMPLETE_NAME" value="Voice Presentation"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation"/> + <filter token="SHORT_NAME" value="presentation"/> + <filter token="COMPLETE_NAME" value="Voice Presentation"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard"/> + <filter token="SHORT_NAME" value="board"/> + <filter token="COMPLETE_NAME" value="Voice Board"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/voiceboard.php"> + <filterset> + <filter token="MODULE_NAME" value="voiceboard"/> + <filter token="SHORT_NAME" value="board"/> + <filter token="COMPLETE_NAME" value="Voice Board"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster"/> + <filter token="SHORT_NAME" value="pc"/> + <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/voicepodcaster.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster"/> + <filter token="SHORT_NAME" value="pc"/> + <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation"/> + <filter token="SHORT_NAME" value="presentation"/> + <filter token="COMPLETE_NAME" value="Voice Presentation"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_bundle.php" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/voicepresentation.php"> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation"/> + <filter token="SHORT_NAME" value="presentation"/> + <filter token="COMPLETE_NAME" value="Voice Presentation"/> + </filterset> + </copy> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr/help/voiceboard/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/fr_utf8/help/voiceboard/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr/help/voicepodcaster/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/fr_utf8/help/voicepodcaster/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr/help/voicepresentation/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/french_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/fr_utf8/help/voicepresentation/mods.html"/> + + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en/help/voiceboard/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" + tofile="${project.build.directory}/generated-sources/mod/voiceboard/lang/en_utf8/help/voiceboard/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en/help/voicepodcaster/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepodcaster/lang/en_utf8/help/voicepodcaster/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en/help/voicepresentation/mods.html"/> + <copy file="${basedir}/src/main/php/mod/voicetools_generic/lang/english_help.html" + tofile="${project.build.directory}/generated-sources/mod/voicepresentation/lang/en_utf8/help/voicepresentation/mods.html"/> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepodcaster/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepodcaster"/> + <filter token="SHORT_NAME" value="pc"/> + <filter token="COMPLETE_NAME" value="Voice Podcaster"/> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voicepresentation/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voicepresentation"/> + <filter token="SHORT_NAME" value="presentation"/> + <filter token="COMPLETE_NAME" value="Voice Presentation"/> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voiceboard/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voiceboard"/> + <filter token="SHORT_NAME" value="board"/> + <filter token="COMPLETE_NAME" value="Voice Board"/> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/liveclassroom/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="liveclassroom"/> + <filter token="SHORT_NAME" value="lc"/> + <filter token="COMPLETE_NAME" value="Wimba Classroom"/> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voiceemail/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voiceemail"/> + <filter token="SHORT_NAME" value="vmail"/> + <filter token="COMPLETE_NAME" value="Voice Email"/> + </filterset> + </copy> + + <copy todir="${project.build.directory}/generated-sources/mod/voiceauthoring/lib" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common"> + </fileset> + <filterset> + <filter token="MODULE_NAME" value="voiceauthoring"/> + <filter token="SHORT_NAME" value="recorder"/> + <filter token="COMPLETE_NAME" value="Voice Authoring"/> + </filterset> + </copy> + + + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetoolsAPI.php" + tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetoolsAPI.php"/> + <copy file="${basedir}/src/main/php/integrations_common/php/vt/WimbaVoicetools.php" + tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/vt/WimbaVoicetools.php"/> + <copy file="${basedir}/src/main/php/integrations_common/php/common/WimbaLib.php" + tofile="${project.build.directory}/generated-sources/mod/voicetools/lib/php/common/WimbaLib.php"/> + + <copy todir="${project.build.directory}/generated-sources/mod/voicetools/lib/web" overwrite="true"> + <fileset dir="${basedir}/src/main/php/integrations_common/web"> + </fileset> + </copy> + + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + + <!-- plugin to assembly the zip, phase=package --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <goals> + <!-- bug http://jira.codehaus.org/browse/MASSEMBLY-97 --> + <!-- It should be 'attached' instead of 'single' --> + <goal>single</goal> + </goals> + <phase>package</phase> + <id>make-assembly</id> + </execution> + </executions> + <configuration> + <finalName>wimba-moodle-${project.version}</finalName> + <descriptors> + <descriptor>$... [truncated message content] |
From: <tro...@us...> - 2008-03-13 20:30:41
|
Revision: 258 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=258&view=rev Author: trollinger Date: 2008-03-13 13:30:33 -0700 (Thu, 13 Mar 2008) Log Message: ----------- Add the missing file in Trunk Added Paths: ----------- trunk/integrations_common/web/pictures/items/voice_tools.png trunk/integrations_common/web/pictures/items/window-left.png trunk/integrations_common/web/pictures/items/window-middle.png trunk/integrations_common/web/pictures/items/window-right.png trunk/integrations_common/web/pictures/items/window200_left.png trunk/integrations_common/web/pictures/items/window200_middle.png trunk/integrations_common/web/pictures/items/window200_right.png trunk/moodle/mod/liveclassroom/popup.php trunk/moodle/mod/voicetools/popup.php Added: trunk/integrations_common/web/pictures/items/voice_tools.png =================================================================== (Binary files differ) Property changes on: trunk/integrations_common/web/pictures/items/voice_tools.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/integrations_common/web/pictures/items/window-left.png =================================================================== (Binary files differ) Property changes on: trunk/integrations_common/web/pictures/items/window-left.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/integrations_common/web/pictures/items/window-middle.png =================================================================== (Binary files differ) Property changes on: trunk/integrations_common/web/pictures/items/window-middle.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/integrations_common/web/pictures/items/window-right.png =================================================================== (Binary files differ) Property changes on: trunk/integrations_common/web/pictures/items/window-right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/integrations_common/web/pictures/items/window200_left.png =================================================================== (Binary files differ) Property changes on: trunk/integrations_common/web/pictures/items/window200_left.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/integrations_common/web/pictures/items/window200_middle.png =================================================================== (Binary files differ) Property changes on: trunk/integrations_common/web/pictures/items/window200_middle.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/integrations_common/web/pictures/items/window200_right.png =================================================================== (Binary files differ) Property changes on: trunk/integrations_common/web/pictures/items/window200_right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/moodle/mod/liveclassroom/popup.php =================================================================== --- trunk/moodle/mod/liveclassroom/popup.php (rev 0) +++ trunk/moodle/mod/liveclassroom/popup.php 2008-03-13 20:30:33 UTC (rev 258) @@ -0,0 +1,74 @@ +<?php +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: February 2008 * + * * + ******************************************************************************/ +require_once("../../config.php"); +require_once("lib.php"); +global $CFG; +$type=$_GET["type"]; + +if($type=="error") +{ + $title=get_string("problem_vt_recorder","liveclassroom"); + $text=get_string("problem_vt","liveclassroom"); +} +else +{ + $title=get_string("activity_welcome_to_wimba","liveclassroom"); + $text=get_string("activity_no_associated_tools","liveclassroom"); +} + + + +?> + +<div class="window-left"> +</div> +<div class="window-middle"> + <table width="100%" border="0" cellpadding="5" cellspacing="3" style="padding:0px"> + <tr> + <td class="popupTitle" colspan="3"> + <?php echo $title; ?></td> + <td align="left"><img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/lib/web/pictures/buttons/x_squared.png" id="IMG1" onclick="javascript:popupCancel()" width="15px"> </td> + </tr> + + <tr> + <td colspan="3"> + <img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/lib/web/pictures/items/liveclassroom.png"id="picture" style="float:left;"> + <div class="popupText" align="center"> + <br> + <?php echo $text; ?> + </div> + </td> + </tr> + <tr> + <td colspan="4" align="center"><input type="button" id="Button1" value="Cancel" onclick="javascript:popupCancel()"> + <input type="button" id="Button1" value="Ok" onclick="javascript:popupOk()"></td> + </tr> + </table> +</div> +<div class="window-right"> +</div> \ No newline at end of file Added: trunk/moodle/mod/voicetools/popup.php =================================================================== --- trunk/moodle/mod/voicetools/popup.php (rev 0) +++ trunk/moodle/mod/voicetools/popup.php 2008-03-13 20:30:33 UTC (rev 258) @@ -0,0 +1,74 @@ +<?php +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: February 2008 * + * * + ******************************************************************************/ +require_once("../../config.php"); +require_once("lib.php"); +global $CFG; +$type=$_GET["type"]; + +if($type=="error") +{ + $title=get_string("problem_vt_recorder","voicetools"); + $text=get_string("problem_vt","voicetools"); +} +else +{ + $title=get_string("activity_welcome_to_wimba","voicetools"); + $text=get_string("activity_no_associated_tools","voicetools"); +} + + + +?> + +<div class="window-left"> +</div> +<div class="window-middle"> + <table width="100%" border="0" cellpadding="5" cellspacing="3" style="padding:0px"> + <tr> + <td class="popupTitle" colspan="3"> + <?php echo $title; ?></td> + <td align="left"><img alt="" src="<?php echo $CFG->wwwroot;?>/mod/voicetools/lib/web/pictures/buttons/x_squared.png" id="IMG1" onclick="javascript:popupCancel()" width="15px"> </td> + </tr> + + <tr> + <td colspan="3"> + <img alt="" src="<?php echo $CFG->wwwroot;?>/mod/voicetools/lib/web/pictures/items/voice_tools.png"id="picture" style="float:left;"> + <div class="popupText" align="center"> + <br> + <?php echo $text; ?> + </div> + </td> + </tr> + <tr> + <td colspan="4" align="center"><input type="button" id="Button1" value="Cancel" onclick="javascript:popupCancel()"> + <input type="button" id="Button1" value="Ok" onclick="javascript:popupOk()"></td> + </tr> + </table> +</div> +<div class="window-right"> +</div> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-03-13 19:57:50
|
Revision: 257 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=257&view=rev Author: trollinger Date: 2008-03-13 12:57:22 -0700 (Thu, 13 Mar 2008) Log Message: ----------- Merge my branche to trunk Modified Paths: -------------- trunk/integrations_common/php/common/WimbaCommons.php trunk/integrations_common/php/common/WimbaUI.php trunk/integrations_common/php/common/WimbaXml.php trunk/integrations_common/php/common/XmlArchive.php trunk/integrations_common/php/common/XmlOrphanedArchive.php trunk/integrations_common/php/common/XmlResource.php trunk/integrations_common/php/common/XmlRoom.php trunk/integrations_common/php/lc/LCAction.php trunk/integrations_common/php/lc/LCRoom.php trunk/integrations_common/php/lc/LCUser.php trunk/integrations_common/php/lc/PrefixUtil.php trunk/integrations_common/php/lc/lcapi.php trunk/integrations_common/php/vt/WimbaVoicetools.php trunk/integrations_common/php/vt/WimbaVoicetoolsAPI.php trunk/integrations_common/web/js/ajax.js trunk/integrations_common/web/js/constants.js trunk/integrations_common/web/js/hwCommons.js trunk/integrations_common/web/js/verifForm.js trunk/integrations_common/web/js/xsl/wimba.xsl trunk/moodle/mod/liveclassroom/backuplib.php 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/lang/en/liveclassroom.php trunk/moodle/mod/liveclassroom/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/logs.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/reports.php trunk/moodle/mod/liveclassroom/version.php trunk/moodle/mod/liveclassroom/view.php trunk/moodle/mod/liveclassroom/welcome.php trunk/moodle/mod/voicetools/config.html trunk/moodle/mod/voicetools/error.php 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/lang/en/voicetools.php trunk/moodle/mod/voicetools/lang/en_utf8/voicetools.php trunk/moodle/mod/voicetools/lib.php trunk/moodle/mod/voicetools/logs.php trunk/moodle/mod/voicetools/manageAction.php trunk/moodle/mod/voicetools/manageActionBlock.php trunk/moodle/mod/voicetools/mod.html trunk/moodle/mod/voicetools/version.php trunk/moodle/mod/voicetools/view.php trunk/moodle/mod/voicetools/voicerecorder.php trunk/moodle/mod/voicetools/welcome.php Added Paths: ----------- trunk/integrations_common/php/common/WimbaLib.php trunk/integrations_common/php/vt/VtAction.php Modified: trunk/integrations_common/php/common/WimbaCommons.php =================================================================== --- trunk/integrations_common/php/common/WimbaCommons.php 2008-03-13 19:51:41 UTC (rev 256) +++ trunk/integrations_common/php/common/WimbaCommons.php 2008-03-13 19:57:22 UTC (rev 257) @@ -1,895 +1,179 @@ <?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 mdify 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: Thomas Rollinger * -* * -* Date: 3th March 2007 * -* * -******************************************************************************/ + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: January 2007 * + * * + ******************************************************************************/ /* $Id: WimbaVoicetoolsAPI.php 45764 2007-02-28 22:04:25Z thomasr $ */ class WimbaMoodleSession{ - var $hparams=array(); - var $url_params; - var $signature=""; - var $currentVtUser ; - var $currentVtUserRigths; - var $timeOfLoad; - var $error=false; - var $request; + var $hparams=array(); + var $url_params; + var $signature=""; + var $currentVtUser ; + var $currentVtUserRigths; + var $timeOfLoad; + var $error=false; + var $request; - function WimbaMoodleSession($parameters=NULL){ - - - $this->timeOfLoad = time(); - $signature=""; - $this->request=$parameters; - if (($this->timeOfLoad - $parameters["time"] <= 1800) && ($this->timeOfLoad - $parameters["time"] >= 0)) - {//30 min - 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 - if( $value=="") - $this->hparams[substr($key,4)] =""; - else - $this->hparams[substr($key,4)] =rawurldecode($value); - // echo $value."<br>"; - $signature .= rawurldecode($value); - - $this->url_params .= "enc_".substr($key,4)."=".rawurlencode($value)."&"; + function WimbaMoodleSession($parameters=NULL){ + $this->timeOfLoad = time(); + $signature=""; + $this->request=$parameters; + if (($this->timeOfLoad - $parameters["time"] <= 1800) && ($this->timeOfLoad - $parameters["time"] >= 0)) + {//30 min + ksort($parameters); + foreach ($parameters as $key => $value) + { + if (strstr($key, 'enc_'))//param use to signature + { + if( $value=="") + { + $this->hparams[substr($key,4)] =""; + } + else + { + $this->hparams[substr($key,4)] =rawurldecode($value); + } + $signature .= rawurldecode($value); + $this->url_params .= "enc_".substr($key,4)."=".rawurlencode($value)."&"; + } + } + + if ($parameters["signature"] != md5($signature))//good signatureature + { + $this->error="signature"; + } + $this->signature=md5($signature); + $this->url_params .="signature=".rawurlencode($this->signature); } - } - - if ($parameters["signature"] != md5($signature))//good signatureature - { - - $this->error="signature"; - - } - $this->signature=md5($signature); - - $this->url_params .="signature=".rawurlencode($this->signature); + else//session time out + { + $this->error="session"; + } } - else//session time out - { - $this->error="session"; - - } - // / print_r($this->hparams) ; - } - function getCourseId(){ - - if(isset($this->hparams["courseId"])) - return $this->hparams["courseId"]; - else - return null; - } - - function getLcCurrentUser(){ - if($this->isInstructor()) - return $this->getCourseId()."_T"; - else - return $this->getCourseId()."_S"; - } - - function setCurrentVtUSer($product,$screenName="",$email="",$role=""){ - $this->currentVtUser = new VtUser(NULL); - $this->currentVtUserRigths = new VtRights(NULL); - if($screenName=="") - $this->currentVtUser->setScreenName($this->hparams["firstname"]."_".$this->hparams["lastname"]); - else - $this->currentVtUser->setScreenName($screenName); - - if($email=="") - $this->currentVtUser->setEmail ($this->hparams["email"]); - else{ - $this->currentVtUser->setEmail ( $email); - - } - - - if (($role!="" && $role=="Instructor") || ($role=="" && $this->hparams["role"]=="Instructor")) { - $this->setVtUserRigths($product,"instructor"); + function getCourseId(){ + if(isset($this->hparams["course_id"])) + { + return $this->hparams["course_id"]; + } + return null; } - else { - - $this->setVtUserRigths($product,"student"); - } - - } - function getVtUser(){ - return $this->currentVtUser; - } - function getVtUserRigths(){ - return $this->currentVtUserRigths; - - } - function setVtUserRigths($product,$role){ - - $this->currentVtUserRigths->setProfile ( 'moodle.'.$product.'.'.$role); - if($product=="presentation") - $this->currentVtUserRigths->add("reply_message"); - } - - function isInstructor(){ - - if($this->hparams["role"]!=null && $this->hparams["role"]=="Instructor"){ - return true; - } - return false; - } - - - - function getFirstname(){ - - if(isset($this->hparams["firstname"]) ){ - return $this->hparams["firstname"]; - } - return ""; - -} - - function getLastname(){ - - if(isset($this->hparams["lastname"]) ){ - return $this->hparams["lastname"]; - } - return ""; - -} - -} -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"])) + function getLcCurrentUser(){ + if($this->isInstructor()) { - $voicetools->availability=1; + return $this->getCourseId()."_T"; } - 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"])); - + return $this->getCourseId()."_S"; + } - - - } - else + function setCurrentVtUSer($product,$screenName="",$email="",$role=""){ + $this->currentVtUser = new VtUser(NULL); + $this->currentVtUserRigths = new VtRights(NULL); + + if($screenName=="") { - $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"]); + $this->currentVtUser->setScreenName($this->hparams["firstname"]."_".$this->hparams["lastname"]); } - if($params["start_min"]=="--") - { - $start_min=0; - } else - { - $start_min=intval($params["start_min"]); + { + $this->currentVtUser->setScreenName($screenName); } - $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"]=="--") + + if($email=="") { - $end_hr=0; + $this->currentVtUser->setEmail ($this->hparams["email"]); } else { - $end_hr=intval($params["end_hr"]); - } - if($params["end_min"]=="--") + $this->currentVtUser->setEmail ( $email); + } + + + if (($role!="" && $role=="Instructor") || ($role=="" && $this->hparams["role"]=="Instructor")) { - $end_min=0; + $this->setVtUserRigths($product,"instructor"); } - else - { - $end_min=intval($params["start_min"]); + else + { + $this->setVtUserRigths($product,"student"); } - $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; - - function vtAction($params){ - $this->params=$params; - - } - /************** - VOICE BOARD - *****************/ - /* - * This function creates a voice board on the vt server - * params : elements of the form - */ - function createBoard(){ - $ressource = new vtResource(NULL); - $audio = new vtAudioFormat(NULL); - $options = new VtOptions(NULL); - // Info - $ressource->setType("board"); //Voice Baord - if (isset($this->params["description"])) - { - $ressource->setDescription(stripslashes($this->params["description"])); - } - - if (isset($this->params["longname"])) - { - $ressource->setTitle(stripslashes($this->params["longname"])); - } - - if ($this->params["led"] == "student") - { - - $options->setFilter("false"); - if (isset($this->params["show_compose"])) - { - $options->setShowCompose("true"); - } - else{ - $options->setShowCompose("false"); - } - } - else - { - $options->setFilter("true"); - $options->setShowCompose("false"); - } - - //Media - - if(isset($this->params["audio_format"])) - { - $audio->setName($this->params["audio_format"]); - } - //message length - if(isset($this->params["max_length"])) - { - $options->setMaxLength($this->params["max_length"]); - } - - //Features - - //short message titles - if(isset($this->params["short_title"])) - { - $options->setShortTitle("true"); - } - else - { - $options->setShortTitle("false"); + function getVtUser(){ + return $this->currentVtUser; } - //chronological order - if(isset($this->params["chrono_order"])) - { - $options->setChronoOrder("true"); + + function getVtUserRigths(){ + return $this->currentVtUserRigths; } - else - { - $options->setChronoOrder("false"); - } - - //forward message - if(isset($this->params["show_forward"])) - { - $options->setShowForward("true"); - } - else - { - $options->setShowForward("false"); - } - - - $options->setAudioFormat($audio); - $ressource->setOptions($options); - //create the resource on the vt server - $result = voicetools_api_create_resource($ressource->getResource()); - if(VTAPI_DEBUG) { - error_log (__FUNCTION__ ." : Board Created , rid=".$result->getRid(), TRUE); - } - return $result; - - } - /* - * This function modifies a voice board on the vt server - * params : elements of the form - */ - function modifyBoard($id){ - - $ressource = new vtResource(NULL); - $audio = new vtAudioFormat(NULL); - $options = new VtOptions(NULL); - // Info - $ressource->setType("board"); //Voice Baord - if (isset($this->params["description"])) - { - $ressource->setDescription(stripslashes($this->params["description"])); + function setVtUserRigths($product,$role){ + $this->currentVtUserRigths->setProfile ( 'moodle.'.$product.'.'.$role); + if($product=="presentation") + { + $this->currentVtUserRigths->add("reply_message"); + } } - - - if (isset($this->params["longname"])) - { - $ressource->setTitle(stripslashes($this->params["longname"])); + + function isInstructor(){ + if($this->hparams["role"]!=null && $this->hparams["role"]=="Instructor") + { + return true; + } + return false; } - if ($this->params["led"] == "student") - { - - $options->setFilter("false"); - if (isset($this->params["show_compose"])) - { - $options->setShowCompose("true"); - } - else{ - $options->setShowCompose("false"); - } - } - else - { - $options->setFilter("true"); - $options->setShowCompose("false"); - } - - //Media - - if(isset($this->params["audio_format"])) - { - $audio->setName($this->params["audio_format"]); - } - //message length - if(isset($this->params["max_length"])) - { - $options->setMaxLength($this->params["max_length"]); - } - - //Features - - //short message titles - if(isset($this->params["short_title"])) - { - $options->setShortTitle("true"); - } - else - { - $options->setShortTitle("false"); + function getFirstname(){ + + if(isset($this->hparams["firstname"])) + { + return $this->hparams["firstname"]; + } + return ""; } - //chronological order - if(isset($this->params["chrono_order"])) - { - $options->setChronoOrder("true"); - } - else - { - $options->setChronoOrder("false"); - } - - //forward message - if(isset($this->params["show_forward"])) - { - $options->setShowForward("true"); - } - else - { - $options->setShowForward("false"); + + function getLastname(){ + + if(isset($this->hparams["lastname"])) + { + return $this->hparams["lastname"]; + } + return ""; } - - - $options->setAudioFormat($audio); - $ressource->setOptions($options); - //update - $ressource->setRid($id); - - //create the resource on the vt server - $result = voicetools_api_modify_resource($ressource->getResource()); - return $result; - - } - - /**************** - VOICE PRESENTATION - ****************/ - /* - * This function creates a voice presentation the vt server - * params : elements of the form(constructor) - */ - function createPresentation(){ - - $ressource = new vtResource(NULL); - $audio = new vtAudioFormat(NULL); - $options = new VtOptions(NULL); - // Info - $ressource->setType("presentation"); //Voice Baord - if (isset($this->params["description"])) - { - $ressource->setDescription(stripslashes($this->params["description"])); - } - - if (isset($this->params["longname"])) - { - $ressource->setTitle(stripslashes($this->params["longname"])); - } - - if(isset($this->params["filter"])) - { - $options->setFilter("true"); - } - else - { - $options->setFilter("false"); - } - //slides comments private - if(isset($this->params["show_reply"])) - { - $options->setShowReply("true"); - } - else - { - $options->setShowReply("false"); - } - - //Media - if(isset($this->params["audio_format"])) - { - $audio->setName($this->params["audio_format"]); - } - //message length - if(isset($this->params["max_length"])) - { - $options->setMaxLength($this->params["max_length"]); - } - - - $options->setAudioFormat($audio); - $ressource->setOptions($options); - - //create the resource on the vt server - $result = voicetools_api_create_resource($ressource->getResource()); - return $result; - } - - /* - * This function modifies a voice presentation the vt server - * params : elements of the form(constructor) - */ - function modifyPresentation($id){ - - $ressource = new vtResource(NULL); - $audio = new vtAudioFormat(NULL); - $options = new VtOptions(NULL); - // Info - $ressource->setType("presentation"); //Voice Presentation - if (isset($this->params["description"])) - { - $ressource->setDescription(stripslashes($this->params["description"])); - } - - if (isset($this->params["longname"])) - { - $ressource->setTitle(stripslashes($this->params["longname"])); - } - - if(isset($this->params["filter"])) - { - $options->setFilter("true"); - } - else - { - $options->setFilter("false"); - } - //slides comments private - if(isset($this->params["show_reply"])) - { - $options->setShowReply("true"); - } - else - { - $options->setShowReply("false"); - } - - //Media - if(isset($this->params["audio_format"])) - { - $audio->setName($this->params["audio_format"]); - } - //message length - if(isset($this->params["max_length"])) - { - $options->setMaxLength($this->params["max_length"]); - } - - - $options->setAudioFormat($audio); - $ressource->setOptions($options); - $ressource->setRid($id); - //create the resource on the vt server - $result = voicetools_api_modify_resource($ressource->getResource()); - return $result; - - - } - - /******** - Podcaster - **********/ - /* - * This function creates a podcaster the vt server - * params : elements of the form(constructor) - */ - function createPodcaster(){ - - $ressource = new vtResource(NULL); - $audio = new vtAudioFormat(NULL); - $options = new VtOptions(NULL); - - // Info - $ressource->setType("pc");//Podcaster - if (isset($this->params["description"])) - { - $ressource->setDescription(stripslashes($this->params["description"])); - } - - if (isset($this->params["longname"])) - { - $ressource->setTitle(stripslashes($this->params["longname"])); - } - if(isset($this->params["show_compose"])) - { - $options->setShowCompose("true"); - } - else - { - $options->setShowCompose("false"); - } - - //Media - if(isset($this->params["audio_format"])) - { - $audio->setName($this->params["audio_format"]); - } - - if(isset($this->params["delay"])) - { - $options->setDelay($this->params["delay"]); //no delay - } - - //Features - if(isset($this->params["short_title"])) - { - $options->setShortTitle("true"); - } - else{ - $options->setShortTitle("false"); - } - $options->setMaxLength(1200); //set to 20 min - $options->setAudioFormat($audio); - $ressource->setOptions($options); - - //create the resource on the vt server - $result = voicetools_api_create_resource($ressource->getResource()); - return $result; - } - /* - * This function modifies a podcaster the vt server - * params : elements of the form(constructor) - */ - function modifyPodcaster($id){ - $ressource = new vtResource(NULL); - $audio = new vtAudioFormat(NULL); - $options = new VtOptions(NULL); +} - // Info - $ressource->setType("pc");//Podcaster - if (isset($this->params["description"])) - { - $ressource->setDescription(stripslashes($this->params["description"])); - } - if (isset($this->params["longname"])) - { - $ressource->setTitle(stripslashes($this->params["longname"])); - } - if(isset($this->params["show_compose"])) - { - $options->setShowCompose("true"); - } - else - { - $options->setShowCompose("false"); - } - //Media - if(isset($this->params["audio_format"])) - { - $audio->setName($this->params["audio_format"]); - } - if(isset($this->params["delay"])) - { - $options->setDelay($this->params["delay"]); //no delay - } - //Features - if(isset($this->params["short_title"])) - { - $options->setShortTitle("true"); - } - else{ - $options->setShortTitle("false"); - } - $options->setMaxLength(1200); //set to 20 min - $options->setAudioFormat($audio); - $ressource->setOptions($options); - - $ressource->setRid($id); - //create the resource on the vt server - $result = voicetools_api_modify_resource($ressource->getResource()); - - return $result; - } - /******** - Recorder - **********/ - /* - * This function creates a recorder the vt server - * params : blocks' id - */ - function createRecorder(){ - - $ressource = new vtResource(NULL); - $audio = new vtAudioFormat(NULL); - $options = new VtOptions(NULL); - - // Info - $ressource->setType("recorder"); - - - $options->setMaxLength(1200); //set to 20 min - $options->setAudioFormat($audio); - $ressource->setOptions($options); - - //create the resource on the vt server - $result = voicetools_api_create_resource($ressource->getResource()); - - return $result; - } - - function deleteRessource($rid) - { - $result = voicetools_api_delete_resource($rid); - return $result; - } - - function getVtSession($resource,$user,$rights,$message=null) - { - if($message!=null) - return voicetools_api_create_session ($user->getUser(),$resource->getResource(),$rights->getRights(),$message->getMessage()) ; - else - return voicetools_api_create_session ($user->getUser(),$resource->getResource(),$rights->getRights()) ; - - } - - -} - ?> \ No newline at end of file Added: trunk/integrations_common/php/common/WimbaLib.php =================================================================== --- trunk/integrations_common/php/common/WimbaLib.php (rev 0) +++ trunk/integrations_common/php/common/WimbaLib.php 2008-03-13 19:57:22 UTC (rev 257) @@ -0,0 +1,442 @@ +<?php + +define('WIMBA_INFO', 'info'); +define('WIMBA_WARN', 'warn'); +define('WIMBA_ERROR', 'error'); +define('WIMBA_DEBUG', 'debug'); +define('WIMBA_DIR', $CFG->dataroot . "/wimba"); +/** + * Returns the keys of the general parameters passed by GET or POST + */ + +function getKeysOfGeneralParameters() +{ + return array( + array("value" => "enc_course_id", "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_ALPHA, "default_value" => "false"), + array("value" => "createWorkflow", "type" => PARAM_BOOL, "default_value" => false), + array("value" => "action", "type" => PARAM_ALPHA, "default_value" => null), + array("value" => "resource_id", "type" => PARAM_CLEAN, "default_value" => "0"), + array("value" => "error", "type" => PARAM_CLEAN, "default_value" => ""), + ); +} + +function getKeyWimbaClassroomForm() +{ + return array ( + array("value" => "longname", "type" => PARAM_CLEAN, "default_value" => null), + array("value" => "description", "type" => PARAM_CLEAN, "default_value" => ""), + 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_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" => "enabled_student_eboard", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "enabled_students_breakoutrooms", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "enabled_students_mainrooms", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "enabled_status", "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_BOOL, "default_value" => "0"), + array("value" => "userlimitValue", "type" => PARAM_INT, "default_value" => -1) + ) ; +} + +function getKeyWimbaVoiceForm() +{ + return array ( + array("value" => "longname", "type" => PARAM_CLEAN, "default_value" => ""), + array("value" => "description", "type" => PARAM_CLEAN, "default_value" => "dd"), + array("value" => "led", "type" => PARAM_ALPHA, "default_value" => "student"), + + array("value" => "audio_format", "type" => PARAM_CLEAN, "default_value" => "medium"), + array("value" => "max_length", "type" => PARAM_INT, "default_value" => "0"), + array("value" => "delay", "type" => PARAM_INT, "default_value" => "0"), + + array("value" => "short_title", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "chrono_order", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "show_reply", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "show_forward", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "show_compose", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "filter", "type" => PARAM_ALPHA, "default_value" => "false"), + + array("value" => "accessAvailable", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "start_date", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "start_month", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_day", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_year", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_hr", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_min", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_date", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "end_month", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_day", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_year", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_hr", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_min", "type" => PARAM_ALPHANUM, "default_value" => "0"), + ); +} + +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 redirection($url) +{ + header('Location:' . $url); + exit (); +} +function parentRedirection($url) +{ + echo '<script> window.top.location="' . $url . '"; </script>'; + exit (); +} + +function manage_error($errno, $error, $file, $line, $context) +{ + global $error_wimba; + if ($errno == E_USER_ERROR or $errno == E_ERROR) + { + wimba_add_log(WIMBA_ERROR,"general",$error ." in ".$file." line ".$line); + $error_wimba = true; + } + else if ($errno < E_USER_NOTICE) + { + wimba_add_log(WIMBA_DEBUG,"general",$error ." in ".$file." line ".$line); + } + +} + +function txt($string) +{ + $result = str_replace("<br />", "" , $string); + $result = str_replace("<p>", "" , $result); + $result = str_replace("</p>", "" , $result); + return $result; +} + +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 + 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_course_id=" . 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,$course_id, $params) +{ + + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + if(isset($params["name"])) + { + $voicetools->name = $params["name"]; + } + $voicetools->type = $params["type"]; + + if ($params != null) + { + $voicetools->availability = $params["accessAvailable"]; + if ($params["start_date"] == "true") + { + $start_hr = intval($params["start_hr"]); + $start_min = intval($params["start_min"]); + $start_month = intval($params["start_month"]); + $start_day = intval($params["start_day"]); + $start_year = intval($params["start_year"]); + $voicetools->start_date = mktime($start_hr, $start_min, 0, $start_month, $start_day, $start_year); + } + else + { + $voicetools->start_date = -1; + } + + if ($params["end_date"] == "true") { + $end_hr = intval($params["end_hr"]); + $end_min = intval($params["end_min"]); + $end_month = intval($params["end_month"]); + $end_day = intval($params["end_day"]); + $end_year = intval($params["end_year"]); + $voicetools->end_date = mktime($end_hr, $end_min, 0, $end_month, $end_day, $end_year); + } + else + { + $voicetools->end_date = -1; + } + } + return voicetools_store_new_element($voicetools); +} + +function updateResource($rid,$course_id, $params) +{ + $voicetools = new Object(); + $voicetools->rid = $rid; + $voicetools->course = $course_id; + $voicetools->type = $params["type"]; + $voicetools->availability = $params["accessAvailable"]; + + if ($params["start_date"] == "true") + { + $start_hr = intval($params["start_hr"]); + $start_min = intval($params["start_min"]); + $start_month = intval($params["start_month"]); + $start_day = intval($params["start_day"]); + $start_year = intval($params["start_year"]); + $voicetools->start_date = mktime($start_hr, $start_min, 0, $start_month, $start_day, $start_year); + } + else + { + $voicetools->start_date = -1; + } + + if ($params["end_date"] == "true") { + $end_hr = intval($params["end_hr"]); + $end_min = intval($params["end_min"]); + $end_month = intval($params["end_month"]); + $end_day = intval($params["end_day"]); + $end_year = intval($params["end_year"]); + $voicetools->end_date = mktime($end_hr, $end_min, 0, $end_month, $end_day, $end_year); + } + else + { + $voicetools->end_date = -1; + } + return voicetools_update_element($voicetools); +} + +function isVtAvailable($rid) +{ + $preview = false; + $vt_informations = voicetools_get_voicetool_informations($rid); + + if ($vt_informations != null && $vt_informations->availability == 0) + { + $preview = false; + } + elseif ($vt_informations != null && $vt_informations->start_date == -1 && $vt_informations->end_date == -1) + { + $preview = true; + } + elseif ($vt_informations != null && $vt_informations->start_date == -1 && time() <= $vt_informations->end_date) + { + $preview = true; + } + elseif ($vt_informations != null && $vt_informations->start_date < time() && $vt_informations->end_date == -1) + { + $preview = true; + } + elseif ($vt_informations != null && $vt_informations->start_date < time() && time() < $vt_informations->end_date) + { + $preview = true; + } + else { + $preview = false; + } + + return $preview; +} + +/**Add logs in moodledata + * param : the level og the log ('info', 'warn','error' or 'debug'), the message to display on the log + * return : void, store the log in MOODLEDATADIR/wimba/logs/LEVEL + */ +function wimba_add_log($level,$product,$message){ + +//Set the log level values. +$level_values = array( + WIMBA_DEBUG => 1, + WIMBA_INFO => 2, + WIMBA_WARN => 3, + WIMBA_ERROR => 4 +); + global $CFG; + + $log_product = $product."_log_level"; + + if(!isset($CFG->$log_product)){ + $CFG->$log_product=2;//default to Info + } +//Write on the logs only if the configured level allows it. + if ($product=="general" || $level_values[$level] >= $CFG->$log_product){ + + // Gets the site shortname + $site = get_record('course','id',SITEID); + + //Computes the timestamp corresponding to the day (at 00:00:00). + $today_timestamp = @mktime(0, 0, 0, date("m"), date("d"), date("Y")); + + //If it doesn't exist, create the log folder' + @mkdir(WIMBA_DIR, 0700); + + @mkdir(WIMBA_DIR . "/" . $product, 0700); + + $wimba_logs= WIMBA_DIR . "/" . $product . "/logs"; + @mkdir($wimba_logs, 0700); + + //Computes the log filename. Space characters are replaced by unerscore, to have a correct filename. + $file = $wimba_logs."/".str_replace(' ','_',$site->shortname)."-".$today_timestamp."-wimba.log"; + + //Writes the message in the log, and close it + $fh = @fopen($file, "a"); + @fwrite($fh,gmdate("Y-m-d H:i:s")." ".strtoupper($level)." ".$product." - ".$message."\n"); + @fclose($fh); + } +} + + +?> Modified: trunk/integrations_common/php/common/WimbaUI.php =================================================================== --- trunk/integrations_common/php/common/WimbaUI.php 2008-03-13 19:51:41 UTC (rev 256) +++ trunk/integrations_common/php/common/WimbaUI.php 2008-03-13 19:57:22 UTC (rev 257) @@ -1,1913 +1,2909 @@ <?php class WimbaUI { - var $session; - var $api; - var $xml; - var $currentObject; - var $isArchive = "false"; - var $lectureRoom; - var $discussionRoom; - var $isLectureRoom; - var $disabledSetting; - var $currentTab; - //for vt - var $currentObjectInformations = NULL; - var $currentObjectOptions = NULL; - var $currentObjectAudioFormat = NULL; - var $startSelect = false; - var $endSelect = false; - var $prefix; - var $id; - - function WimbaUI($session, $api = NULL, $currentIdtab = "") { + + var $session; + var $api; + var $xml; + var $currentObject; + var $isArchive = "false"; + var $lectureRoom; + var $discussionRoom; + var $isLectureRoom; + var $disabledSetting; + var $currentTab; + //for vt + var $currentObjectInformations = NULL; + var $currentObjectOptions = NULL; + var $currentObjectAudioFormat = NULL; + var $startSelect = false; + var $endSelect = false; + var $prefix; + var $id; + + function WimbaUI($session_params, $api = NULL, $currentIdtab = "") + { + $this->session = new WimbaMoodleSession($session_params); + $this->api = $api; + $this->xml = new WimbaXml(); + $this->currentTab = $currentIdtab; + + if($api!=null) + { + $this->prefix=$api->getPrefix(); + } + } + + /** + * Configure different parmaters used to generate the xml according to the current product + * @param product : the product which will be display (liveclassroom or voicetools) + * @param $serverInformations : contains the informations get from the server + * @param $databaseInformations : contains the informations get from the database + */ + function setCurrentProduct($product, $serverInformations = NULL, $databaseInformations= NULL) + { - $this->session = $session; - $this->api = $api; + + $this->product = $product; + $this->currentObject = $serverInformations; + + + if($this->currentObject == null) + { + $this->id=$this->session->getCourseId() . rand(); + } + + if ($product == "liveclassroom") + { + if(isset($this->currentObject)) + $roomId=$this->currentObject->getRoomId(); + + if ($this->currentObject != null && $this->currentObject->isArchive()) + { + $this->isArchive = "true"; + } + + $courseId=$this->session->getCourseId() . "_S"; + $isStudentAdmin= $this->api->isStudentAdmin($roomId, $courseId); + + if ($this->currentObject == null + || $this->currentObject != null && $isStudentAdmin == "false") + { + $this->lectureRoom = "activeSetting"; + $this->discussionRoom = "hiddenSetting"; + $this->disabledSetting = "activeSetting"; + $this->isLectureRoom = true; + } + else + { + $this->lectureRoom = "hiddenSetting"; + $this->discussionRoom = "activeSetting"; + $this->disabledSetting = "disabledSetting"; + $this->isLectureRoom = false; + } + } + else + { + //data of the database + $this->currentObjectInformations = $databaseInformations; + if ($this->currentObjectInformations != null + && $this->currentObjectInformations->start_date != -1) + { + $this->startSelect = true; + } + + if ( $this->currentObjectInformations != null + && $this->currentObjectInformations->end_date != -1 ) + { + $this->endSelect = true; + } + + if (isset($this->currentObject) + && isset($this->currentObjectInformations)) { + //for php 4-> object->object doesn't work + $this->currentObjectOptions = $this->currentObject->getOptions(); + $this->currentObjectAudioFormat = $this->currentObjectOptions->getAudioFormat(); + } + } + } + + /** + * Add the necessary elements to the current xml object to render the principal view of the lc component + * @param message : eventual information message displayed at the bottom of the component + */ + function getLCPrincipalView($message) { + /******** + SESSION + *********/ + $this->xml->CreateInformationElement( + $this->session->timeOfLoad, + $this->session->hparams["firstname"], + $this->session->hparams["lastname"], + $this->session->hparams["email"], + $this->session->hparams["role"], + $this->session->hparams["course_id"], + $this->session->signature, + ""); + + /******** + HEADER + *********/ + if($this->session->isInstructor()) + { + $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "false", "true"); + } + else + { + $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "false", "false"); + } + /******** + MENU + *********/ + $this->xml->addButtonElement( + "all", + "all", + "disabled", + "lib/web/pictures/buttons/toolbar-launch", + get_string('toolbar_launch', 'liveclassroom'), + "javascript:LaunchElement('doAction.php','liveclassroom');"); - $this->xml = new WimbaXml(); - $this->currentTab = $currentIdtab; - if($api!=null) - { - $this->prefix=$api->getPrefix(); - } - } + if($this->session->isInstructor()) + { + $this->xml->addButtonElement( + "instructor", + "all", + "disabled", + 'lib/web/pictures/buttons/toolbar-activities', + get_string('toolbar_activity', 'liveclassroom'), + "doOpenAddActivity('../../course/mod.php','section=0&sesskey=" . sesskey() . "&add=liveclassroom')"); + + $this->xml->addButtonElement( + "instructor", + "all", + "enabled", + "lib/web/pictures/buttons/toolbar-new", + get_string('toolbar_new', 'liveclassroom'), + "javascript:loadNewSettings('generateSettings.php','create','liveclassroom' ,'liveclassroom','all')"); + + $this->xml->addSpaceElement("20px", "instructor"); + + $this->xml->addButtonElement( + "instructor", + "all", + "disabled", + "lib/web/pictures/buttons/toolbar-content", + get_string('toolbar_content', 'liveclassroom'), + "javascript:openContent('doAction.php');"); + + $this->xml->addButtonElement( + "instructor", + "all", + "disabled", + "lib/web/pictures/buttons/toolbar-poll", + get_string('toolbar_reports', 'liveclassroom'), + "javascript:openReport('doAction.php');"); + + $this->xml->addSpaceElement("10px", "instructor"); + + $this->xml->addButtonElement( + "instructor", + "all", + "disabled", + "lib/web/pictures/buttons/toolbar-settings", + get_string('toolbar_settings', 'liveclassroom'), + "javascript:editSettings('generateSettings.php','all');"); + + $this->xml->addButtonElement( + "instructor", + "all", + "disabled", + "lib/web/pictures/buttons/toolbar-delete", + get_string('toolbar_delete', 'liveclassroom'), + "javascript:deleteResource('doAction.php');"); + + $this->xml->addSpaceElement("50px", "instructor"); + } + else + { + $this->xml->addSpaceElement("300px", "instructor"); + } + + if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari')) + { + $this->xml->addSearchElement("all", "Safari"); + } + else + { + $this->xml->addSearchElement("all", "other"); + } + + //MESSAGE BAR + if (isset ($message) && $message!="") + { + $this->xml->addMessage($message); + } + + $rooms=$this->getListLiveClassroom(); + + if($rooms!=false || $rooms==null) + { + $this->xml->addProduct( + "liveclassroom", + "productType", + "Liv... [truncated message content] |
From: <tro...@us...> - 2008-03-13 19:51:46
|
Revision: 256 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=256&view=rev Author: trollinger Date: 2008-03-13 12:51:41 -0700 (Thu, 13 Mar 2008) Log Message: ----------- update the header of the files Modified Paths: -------------- branches/team/Thomas/integrations_common/php/common/WimbaCommons.php branches/team/Thomas/integrations_common/php/common/WimbaUI.php branches/team/Thomas/integrations_common/php/common/WimbaXml.php branches/team/Thomas/integrations_common/php/common/XmlOrphanedArchive.php branches/team/Thomas/integrations_common/php/lc/LCAction.php branches/team/Thomas/integrations_common/php/lc/lcapi.php branches/team/Thomas/integrations_common/php/vt/VtAction.php branches/team/Thomas/integrations_common/php/vt/WimbaVoicetools.php branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php Modified: branches/team/Thomas/integrations_common/php/common/WimbaCommons.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaCommons.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/common/WimbaCommons.php 2008-03-13 19:51:41 UTC (rev 256) @@ -1,30 +1,30 @@ <?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 mdify 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: Thomas Rollinger * -* * -* Date: 3th March 2007 * -* * -******************************************************************************/ + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: January 2007 * + * * + ******************************************************************************/ /* $Id: WimbaVoicetoolsAPI.php 45764 2007-02-28 22:04:25Z thomasr $ */ class WimbaMoodleSession{ Modified: branches/team/Thomas/integrations_common/php/common/WimbaUI.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-03-13 19:51:41 UTC (rev 256) @@ -424,7 +424,7 @@ "actionHide", "javascript:launchAjaxRequest('generateListRooms.php','',true,'all')", "advanced_Ok"); - if ($createWorkflow == "true") + if ($createWorkflow == true) { $this->xml->createValidationButtonElement( get_string("validationElement_cancel", "liveclassroom"), @@ -454,7 +454,7 @@ $this->xml->createValidationButtonElement( get_string("validationElement_saveAll", "liveclassroom"), "action", - "javascript:submitForm('doAction.php','update','".$this->currentObject->getRoomId()."')", + "javascript:submitForm('doAction.php','update','".$this->currentObject->getRoomId()."','" . $createWorkflow . "')", "setting_Save"); } } @@ -1466,9 +1466,10 @@ $parameters["value"] = $this->api->getServer() . "/launcher.cgi?room=" . $this->id; - $this->xml->addInputElement($parameters); + } - + $this->xml->addInputElement($parameters); + $parameters = array ( "colspan" => 3, "id" => "launcher_link_row" Modified: branches/team/Thomas/integrations_common/php/common/WimbaXml.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaXml.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/common/WimbaXml.php 2008-03-13 19:51:41 UTC (rev 256) @@ -1,30 +1,31 @@ <?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: Thomas Rollinger * -* * -* Date: 30 January 2007 * -* * -******************************************************************************/ + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: January 2007 * + * * + ******************************************************************************/ + /* $Id: $ */ class WimbaXml{ @@ -311,10 +312,12 @@ if(count($elements)>0) { $listElements = $this->xmldoc->create_element("listElements"); - foreach ($elements as $key => $value) - { - $listElements->append_child($value->getXml($this->xmldoc)); - } + if($elements!=null){ + foreach ($elements as $key => $value) + { + $listElements->append_child($value->getXml($this->xmldoc)); + } + } $product->append_child($listElements); } $productSentence = $this->xmldoc->create_element("NoElementSentence");//for student and isntructor or just for instructor Modified: branches/team/Thomas/integrations_common/php/common/XmlOrphanedArchive.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/XmlOrphanedArchive.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/common/XmlOrphanedArchive.php 2008-03-13 19:51:41 UTC (rev 256) @@ -11,6 +11,7 @@ var $nameDisplay; var $preview; var $url; + var $param; var $url_params; var $tooltipAvailability; var $tooltipDial; Modified: branches/team/Thomas/integrations_common/php/lc/LCAction.php =================================================================== --- branches/team/Thomas/integrations_common/php/lc/LCAction.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/lc/LCAction.php 2008-03-13 19:51:41 UTC (rev 256) @@ -1,11 +1,31 @@ <?php +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: January 2007 * + * * + ******************************************************************************/ -/* -? * Created on Jun 12, 2007 - * - * To change the template for this generated file go to - * Window - Preferences - PHPeclipse - PHP - Code Templates - */ require_once ("LCUser.php"); class LCAction { @@ -148,7 +168,7 @@ $room->setUserstatusEnabled($this->session->request["enabled_status"]); $room->setSendUserstatusUpdates($this->session->request["status_appear"]); // Maximum Users - if ($this->session->request["userlimit"] == "true") + if ($this->session->request["userlimit"] == true) { $room->setUserLimit((string) $this->session->request["userlimitValue"]); } Modified: branches/team/Thomas/integrations_common/php/lc/lcapi.php =================================================================== --- branches/team/Thomas/integrations_common/php/lc/lcapi.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/lc/lcapi.php 2008-03-13 19:51:41 UTC (rev 256) @@ -1,28 +1,31 @@ <?php -/** - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * - * +/****************************************************************************** + * * + * Copyright (c) 1999-2008 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. * - * + * This software is the property of 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 * - * + * 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 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: February, 11th 2007 * - */ + * * + * Date: February 2007 * + * * + ******************************************************************************/ + /* $Id:$ */ /** * This is the API to authenticate and perform transactions with the Live cLassroom server. Modified: branches/team/Thomas/integrations_common/php/vt/VtAction.php =================================================================== --- branches/team/Thomas/integrations_common/php/vt/VtAction.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/vt/VtAction.php 2008-03-13 19:51:41 UTC (rev 256) @@ -1,4 +1,31 @@ <?php +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: January 2007 * + * * + ******************************************************************************/ + class vtAction{ var $params;//stack of parameters Modified: branches/team/Thomas/integrations_common/php/vt/WimbaVoicetools.php =================================================================== --- branches/team/Thomas/integrations_common/php/vt/WimbaVoicetools.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/vt/WimbaVoicetools.php 2008-03-13 19:51:41 UTC (rev 256) @@ -1,30 +1,31 @@ <?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: Thomas Rollinger * - * * - * Date: 30 January 2007 * - */ +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: January 2007 * + * * + ******************************************************************************/ - /* $Id: $ */ /** Modified: branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php =================================================================== --- branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php 2008-03-13 19:43:48 UTC (rev 255) +++ branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php 2008-03-13 19:51:41 UTC (rev 256) @@ -1,28 +1,30 @@ <?php -/** - * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * - * +/****************************************************************************** + * * + * Copyright (c) 1999-2008 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. * - * + * This software is the property of 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 * - * + * 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 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 * - */ + * * + * Date: April 2006 * + * * + ******************************************************************************/ /* $Id: WimbaVoicetoolsAPI.php 50661 2007-06-28 20:33:11Z thomasr $ */ error_reporting(E_ALL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-03-13 19:43:50
|
Revision: 255 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=255&view=rev Author: trollinger Date: 2008-03-13 12:43:48 -0700 (Thu, 13 Mar 2008) Log Message: ----------- update the header of the files Modified Paths: -------------- branches/team/Thomas/moodle/mod/liveclassroom/backuplib.php branches/team/Thomas/moodle/mod/liveclassroom/config.html branches/team/Thomas/moodle/mod/liveclassroom/doAction.php branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php branches/team/Thomas/moodle/mod/liveclassroom/index.php branches/team/Thomas/moodle/mod/liveclassroom/lib.php branches/team/Thomas/moodle/mod/liveclassroom/logs.php branches/team/Thomas/moodle/mod/liveclassroom/mod.html branches/team/Thomas/moodle/mod/liveclassroom/popup.php branches/team/Thomas/moodle/mod/liveclassroom/reports.php branches/team/Thomas/moodle/mod/liveclassroom/version.php branches/team/Thomas/moodle/mod/liveclassroom/view.php branches/team/Thomas/moodle/mod/liveclassroom/welcome.php branches/team/Thomas/moodle/mod/voicetools/error.php branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php branches/team/Thomas/moodle/mod/voicetools/getXmlNewPanel.php branches/team/Thomas/moodle/mod/voicetools/lib.php branches/team/Thomas/moodle/mod/voicetools/logs.php branches/team/Thomas/moodle/mod/voicetools/manageAction.php branches/team/Thomas/moodle/mod/voicetools/mod.html branches/team/Thomas/moodle/mod/voicetools/popup.php branches/team/Thomas/moodle/mod/voicetools/view.php Modified: branches/team/Thomas/moodle/mod/liveclassroom/backuplib.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/backuplib.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/backuplib.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,103 +1,210 @@ -<?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: Hugues Pisapia * - * * - * Date: 15th April 2006 * - * * - ******************************************************************************/ +<?php //$Id: backuplib.php,v 1.5 2006/01/13 03:45:29 mjollnir_ Exp $ + //This php script contains all the stuff to backup/restore + //liveclassroom mods -/* $Id: backuplib.php 188 2007-04-13 13:23:01Z hugues $ */ + //This is the "graphical" structure of the liveclassroom mod: + // + // liveclassroom + // (CL,pk->id) + // | + // | + // | + // liveclassroom_messages + // (UL,pk->id, fk->liveclassroomid) + // + // Meaning: pk->primary key field of the table + // fk->foreign key to link with parent + // nt->nested field (recursive data) + // CL->course level info + // UL->user level info + // files->table may have files) + // + //----------------------------------------------------------- -/// Library of functions and constants for module liveclassroom + //This function executes all the backup procedure about this mod + function liveclassroom_backup_mods($bf,$preferences) { -require_once($CFG->libdir.'/datalib.php'); -//require_once("$CFG->dirroot/mod/liveclassroom/api.php"); -require_once("$CFG->dirroot/mod/liveclassroom/lib.php"); + global $CFG; + $status = true; + //Iterate over liveclassroom table + $liveclassrooms = get_records ("liveclassroom","course",$preferences->backup_course,"id"); + if ($liveclassrooms) { + foreach ($liveclassrooms as $liveclassroom) { + if (backup_mod_selected($preferences,'liveclassroom',$liveclassroom->id)) { + $status = liveclassroom_backup_one_mod($bf,$preferences,$liveclassroom); + } + } + } + return $status; + } -function liveclassroom_backup_mods($bf,$preferences) { - global $CFG; + function liveclassroom_backup_one_mod($bf,$preferences,$liveclassroom) { - $status = true; + global $CFG; + + if (is_numeric($liveclassroom)) { + $liveclassroom = get_record('liveclassroom','id',$liveclassroom); + } + + $status = true; - //Iterate over liveclassroom table - $liveclassrooms = get_records ("liveclassroom","course",$preferences->backup_course,"id"); - if ($liveclassrooms) { - foreach ($liveclassrooms as $liveclassroom) { - //Start mod - fwrite ($bf,start_tag("MOD",3,true)); - //Print LC data - fwrite ($bf,full_tag("ID",4,false,$liveclassroom->id)); - fwrite ($bf,full_tag("MODTYPE",4,false,"liveclassroom")); - fwrite ($bf,full_tag("NAME",4,false,$liveclassroom->name)); - - $status =fwrite ($bf,end_tag("MOD",3,true)); + //Start mod + fwrite ($bf,start_tag("MOD",3,true)); + //Print liveclassroom data + fwrite ($bf,full_tag("ID",4,false,$liveclassroom->id)); + fwrite ($bf,full_tag("MODTYPE",4,false,"liveclassroom")); + fwrite ($bf,full_tag("NAME",4,false,$liveclassroom->name)); + fwrite ($bf,full_tag("INTRO",4,false,$liveclassroom->intro)); + fwrite ($bf,full_tag("KEEPDAYS",4,false,$liveclassroom->keepdays)); + fwrite ($bf,full_tag("STUDENTLOGS",4,false,$liveclassroom->studentlogs)); + fwrite ($bf,full_tag("SCHEDULE",4,false,$liveclassroom->schedule)); + fwrite ($bf,full_tag("liveclassroomTIME",4,false,$liveclassroom->liveclassroomtime)); + fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$liveclassroom->timemodified)); + //if we've selected to backup users info, then execute backup_liveclassroom_messages + if (backup_userdata_selected($preferences,'liveclassroom',$liveclassroom->id)) { + $status = backup_liveclassroom_messages($bf,$preferences,$liveclassroom->id); } - } + //End mod + $status =fwrite ($bf,end_tag("MOD",3,true)); - //if we've selected to backup users info, then backup files too - if ($status) { - if ($preferences->mods["liveclassroom"]->userinfo) { - //$status = liveclassroom_backup_files($bf,$preferences); - } + return $status; } - - - return $status; -} + //Backup liveclassroom_messages contents (executed from liveclassroom_backup_mods) + function backup_liveclassroom_messages ($bf,$preferences,$liveclassroom) { + global $CFG; + $status = true; -////Return an array of info (name,value) reporting what will be backed up -function liveclassroom_check_backup_mods($course,$user_data=false,$backup_unique_code) { - //First the course data - $info[0][0] = get_string("modulenameplural","liveclassroom"); - if ($ids = liveclassroom_ids ($course)) { - $info[0][1] = count($ids); - } else { - $info[0][1] = 0; + $liveclassroom_messages = get_records("liveclassroom_messages","liveclassroomid",$liveclassroom,"id"); + //If there is messages + if ($liveclassroom_messages) { + //Write start tag + $status =fwrite ($bf,start_tag("MESSAGES",4,true)); + //Iterate over each message + foreach ($liveclassroom_messages as $cha_mes) { + //Start message + $status =fwrite ($bf,start_tag("MESSAGE",5,true)); + //Print message contents + fwrite ($bf,full_tag("ID",6,false,$cha_mes->id)); + fwrite ($bf,full_tag("USERID",6,false,$cha_mes->userid)); + fwrite ($bf,full_tag("GROUPID",6,false,$cha_mes->groupid)); + fwrite ($bf,full_tag("SYSTEM",6,false,$cha_mes->system)); + fwrite ($bf,full_tag("MESSAGE_TEXT",6,false,$cha_mes->message)); + fwrite ($bf,full_tag("TIMESTAMP",6,false,$cha_mes->timestamp)); + //End submission + $status =fwrite ($bf,end_tag("MESSAGE",5,true)); + } + //Write end tag + $status =fwrite ($bf,end_tag("MESSAGES",4,true)); + } + + return $status; } + //Return an array of info (name,value) + function liveclassroom_check_backup_mods($course,$user_data=false,$backup_unique_code,$instances=null) { - //Now, if requested, the user_data: look for the number of - //rooms/archives available on the server and report - if ($user_data) { - $info[1][0] = get_string("rooms","liveclassroom"); - if ($ids = liveclassroom_count_rooms ($course)) { - $info[1][1] = count($ids); - } else { - $info[1][1] = 0; + if (!empty($instances) && is_array($instances) && count($instances)) { + $info = array(); + foreach ($instances as $id => $instance) { + $info += liveclassroom_check_backup_mods_instances($instance,$backup_unique_code); + } + return $info; } - $info[2][0] = get_string("archives","liveclassroom"); - if ($ids = liveclassroom_count_archives ($course)) { - $info[2][1] = count($ids); + //First the course data + $info[0][0] = get_string("modulenameplural","liveclassroom"); + if ($ids = liveclassroom_ids ($course)) { + $info[0][1] = count($ids)."dddd"; } else { - $info[2][1] = 0; + $info[0][1] = 0; } + + //Now, if requested, the user_data + if ($user_data) { + $info[1][0] = get_string("messages","liveclassroom"); + if ($ids = liveclassroom_message_ids_by_course ($course)) { + $info[1][1] = count($ids)."ssss"; + } else { + $info[1][1] = 0; + } + } + + return $info; } - return $info; -} + //Return an array of info (name,value) + function liveclassroom_check_backup_mods_instances($instance,$backup_unique_code) { + //First the course data + $info[$instance->id.'0'][0] = '<b>'.$instance->name.'</b>'; + $info[$instance->id.'0'][1] = ''; + + //Now, if requested, the user_data + if (!empty($instance->userdata)) { + $info[$instance->id.'1'][0] = get_string("messages","liveclassroom"); + if ($ids = liveclassroom_message_ids_by_instance ($instance->id)) { + $info[$instance->id.'1'][1] = count($ids); + } else { + $info[$instance->id.'1'][1] = 0; + } + } + + return $info; + } + + //Return a content encoded to support interactivities linking. Every module + //should have its own. They are called automatically from the backup procedure. + function liveclassroom_encode_content_links ($content,$preferences) { + + global $CFG; + + $base = preg_quote($CFG->wwwroot,"/"); + + //Link to the list of liveclassrooms + $buscar="/(".$base."\/mod\/liveclassroom\/index.php\?id\=)([0-9]+)/"; + $result= preg_replace($buscar,'$@liveclassroomINDEX*$2@$',$content); + + //Link to liveclassroom view by moduleid + $buscar="/(".$base."\/mod\/liveclassroom\/view.php\?id\=)([0-9]+)/"; + $result= preg_replace($buscar,'$@liveclassroomVIEWBYID*$2@$',$result); + + return $result; + } + + // INTERNAL FUNCTIONS. BASED IN THE MOD STRUCTURE + + //Returns an array of liveclassrooms id + function liveclassroom_ids ($course) { + + global $CFG; + + return get_records_sql ("SELECT c.id, c.course + FROM {$CFG->prefix}liveclassroom c + WHERE c.course = '$course'"); + } + + //Returns an array of assignment_submissions id + function liveclassroom_message_ids_by_course ($course) { + + global $CFG; + + return get_records_sql ("SELECT m.id , m.liveclassroomid + FROM {$CFG->prefix}liveclassroom_messages m, + {$CFG->prefix}liveclassroom c + WHERE c.course = '$course' AND + m.liveclassroomid = c.id"); + } + + //Returns an array of liveclassroom id + function liveclassroom_message_ids_by_instance ($instanceid) { + + global $CFG; + + return get_records_sql ("SELECT m.id , m.liveclassroomid + FROM {$CFG->prefix}liveclassroom_messages m + WHERE m.liveclassroomid = $instanceid"); + } ?> Modified: branches/team/Thomas/moodle/mod/liveclassroom/config.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-03-13 19:43:48 UTC (rev 255) @@ -1,4 +1,31 @@ <?php +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * * + ******************************************************************************/ + + require_once("lib/php/lc/LCAction.php"); require_once("lib/php/lc/lcapi.php"); @@ -40,7 +67,7 @@ <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" /> + <img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/lib/web/pictures/items/liveclassroom.png" border="0" /> </td> <td align="left" class="page_title"> <?php print_string('serverconfiguration', 'liveclassroom')?> Modified: branches/team/Thomas/moodle/mod/liveclassroom/doAction.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-03-13 19:43:48 UTC (rev 255) @@ -2,10 +2,10 @@ /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -17,15 +17,16 @@ * 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; * + * along with the 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 * + * Author: Hazan Samy * * * - * Date: September 2006 * + * Date: September 2006 * * * ******************************************************************************/ + /* $Id: doAction.php 55986 2007-11-13 21:51:00Z thomasr $ */ Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,10 +1,10 @@ <?PHP /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -16,11 +16,11 @@ * 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; * + * along with the Wimba Moodle Integration; * * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * - * Author: Hazan Samy * + * Author: Hazan Samy * * * * Date: October 2006 * * * @@ -94,7 +94,7 @@ if(!empty($error)) { - $uiManager->setError("cla merde"); + $uiManager->setError("erroe"); } echo $uiManager->getXmlString(); Modified: branches/team/Thomas/moodle/mod/liveclassroom/index.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,10 +1,10 @@ <?PHP /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -16,7 +16,7 @@ * 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; * + * along with the Wimba Moodle Integration; * * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,30 +1,31 @@ <?php -/** - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * - * +/****************************************************************************** + * * + * Copyright (c) 1999-2008 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. * - * + * This software is the property of 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 * - * + * 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 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: lib.php 200 2008-01-09 11:37:50Z trollinger $ */ // / Library of functions and constants for module liveclassroom if (!function_exists('getKeysOfGeneralParameters')) { @@ -112,6 +113,8 @@ */ function liveclassroom_add_instance($liveclassroom) { + + global $CFG; // / Given an object containing all the necessary data, // / (defined by the form in mod.html) this function // / will create a new instance and return the id number @@ -123,30 +126,20 @@ // May have to add extra stuff in here # $roomname = $api->lcapi_get_room_name($liveclassroom->type); - if (!$result = insert_record("liveclassroom", $liveclassroom)) { - wimba_add_log(WIMBA_ERROR,WV,"Problem to add a new instance"); - $result = false; + if (!$liveclassroom->id = insert_record("liveclassroom", $liveclassroom)) { + wimba_add_log(WIMBA_ERROR,WC,"Problem to add a new instance"); + return false; } - if (!isset($liveclassroom->section)) - { - $liveclassroom->section = 0; - } - - if ($result != false && isset($liveclassroom->calendar_event) && $liveclassroom->calendar_event == true) + if (isset($liveclassroom->calendar_event) && $liveclassroom->calendar_event == true) { // no problem - liveclassroom_addCalendarEvent($liveclassroom, $result, $roomname); + liveclassroom_addCalendarEvent($liveclassroom, $liveclassroom->id, $roomname); } - else - { - liveclassroom_deleteCalendarEvent($result); - } - wimba_add_log(WIMBA_INFO,WC,"Add Instance".$result); //for the debug wimba_add_log(WIMBA_DEBUG,WC,print_r($liveclassroom, true )); - return true; + return $liveclassroom->id; } function liveclassroom_update_instance($liveclassroom) @@ -304,17 +297,17 @@ /** * CALENDAR */ -function liveclassroom_addCalendarEvent($informations, $instanceNumber, $name) +function liveclassroom_addCalendarEvent($activity_informations, $instanceNumber, $name) { // / Basic event record for the database. global $CFG; $event = new Object(); - $event->name = $informations->name; - $event->description = $informations->description . "<br><a href=" . $CFG->wwwroot . "/mod/liveclassroom/view.php?id=" . $instanceNumber . "&action=launchCalendar target=_self >" . get_string("launch_calendar", "liveclassroom") . " ...</a>"; + $event->name = $activity_informations->name; + $event->description = $activity_informations->description . "<br><a href=" . $CFG->wwwroot . "/mod/liveclassroom/view.php?id=" . $instanceNumber . "&action=launchCalendar target=_self >" . get_string("launch_calendar", "liveclassroom") . " ...</a>"; $event->format = 1; $event->userid = 0; - $event->courseid = $informations->course; //course event + $event->courseid = $activity_informations->course; //course event $event->groupid = 0; $event->modulename = 'liveclassroom'; $event->instance = $instanceNumber; @@ -347,7 +340,8 @@ wimba_add_log(WIMBA_DEBUG,WC,"Add calendar event\n".print_r($event, true )); - if(!$oldEvent=get_record('event','instance',$activity_informations->id)) //old event exsit + $oldEvent=get_record('event','instance',$activity_informations->id); + if(!empty($oldEvent) && $oldEvent!=false) //old event exsit exsit { $event->id = $oldEvent->id ; $result=update_record('event', $event); @@ -411,6 +405,7 @@ */ function liveclassroom_delete_all_instance_of_room($roomid) { + global $CFG; // / Given an ID of an instance of this module, // / this function will permanently delete the instance // / and any data that depends on it. Modified: branches/team/Thomas/moodle/mod/liveclassroom/logs.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/logs.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/logs.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,10 +1,10 @@ <?php /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -16,12 +16,13 @@ * 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; * + * along with the 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 * * * + * * ******************************************************************************/ //This page is to show the logs types and errors, and to explain how resolve the errors! Modified: branches/team/Thomas/moodle/mod/liveclassroom/mod.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-03-13 19:43:48 UTC (rev 255) @@ -1,10 +1,10 @@ <?php /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -16,7 +16,7 @@ * 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; * + * along with the Wimba Moodle Integration; * * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * @@ -795,6 +795,7 @@ <input type="hidden" name=modulename value="<?php p($form->modulename) ?>" /> <input type="hidden" name=instance value="<?php p($form->instance) ?>" /> <input type="hidden" name=mode value="<?php p($form->mode) ?>" /> + <input type="hidden" name="course_format" value="<?php p($course->format) ?>"> <input type="hidden" value="<?php echo $event->timestart;?>" name="calendar_start" id="calendar_start"> <input type="hidden" value="<?php echo $course->startdate;?>" name="calendar_start" id="calendar_start"> </form> Modified: branches/team/Thomas/moodle/mod/liveclassroom/popup.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/popup.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/popup.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,5 +1,30 @@ <?php - +/****************************************************************************** + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Thomas Rollinger * + * * + * Date: February 2008 * + * * + ******************************************************************************/ require_once("../../config.php"); require_once("lib.php"); global $CFG; Modified: branches/team/Thomas/moodle/mod/liveclassroom/reports.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/reports.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/reports.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,10 +1,10 @@ <?PHP /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -16,13 +16,13 @@ * 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; * + * along with the Wimba Moodle Integration; * * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * - * Author: Hazan Samy * + * Author: Hazan Samy * * * - * Date: November 2006 * + * Date: November 2006 * * * ******************************************************************************/ Modified: branches/team/Thomas/moodle/mod/liveclassroom/version.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/version.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/version.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,10 +1,10 @@ <?PHP /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -16,7 +16,7 @@ * 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; * + * along with the Wimba Moodle Integration; * * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * Modified: branches/team/Thomas/moodle/mod/liveclassroom/view.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/view.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/view.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,10 +1,10 @@ <?php /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -16,7 +16,7 @@ * 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; * + * along with the Wimba Moodle Integration; * * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * Modified: branches/team/Thomas/moodle/mod/liveclassroom/welcome.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/welcome.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/liveclassroom/welcome.php 2008-03-13 19:43:48 UTC (rev 255) @@ -2,10 +2,10 @@ /****************************************************************************** * * - * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * * * * COPYRIGHT: * - * This software is the property of Horizon Wimba. * + * This software is the property of 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. * @@ -17,11 +17,11 @@ * 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; * + * along with the Wimba Moodle Integration; * * if not, write to the Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * - * Author: Hazan Samy * + * Author: Hazan Samy * * * * Date: September 2006 * * * @@ -150,7 +150,7 @@ <table width=100% style="height:300px"> <tbody> <tr valign=middle> - <td align=center><img src="lib/web/pictures/items/wheel.gif"><br> + <td align=center><img src="lib/web/pictures/items/Loading.gif"><br> <p><font size="-2" face="Verdana" color="666666"> Loading...</font></p> </td> </tr> Modified: branches/team/Thomas/moodle/mod/voicetools/error.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/error.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/voicetools/error.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,30 +1,30 @@ <?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: Thomas Rollinger * -* * -* Date: 3th March 2007 * -* * -******************************************************************************/ + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: thomas Rollinger * + * * + * Date: March 2007 * * + * * + ******************************************************************************/ /* $Id: WimbaVoicetoolsAPI.php 45764 2007-02-28 22:04:25Z thomasr $ */ ?> Modified: branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,31 +1,30 @@ <?PHP - /****************************************************************************** -* * -* Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * -* * -* COPYRIGHT: * -* This software is the property of Horizon Wimba. * -* You can redistribute it and/or modify it under the terms of * -* the GNU General Public License as published by the * -* Free Software Foundation. * -* * -* WARRANTIES: * -* This software is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with the Horizon Wimba Moodle Integration; * -* if not, write to the Free Software Foundation, Inc., * -* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * -* * -* Author: Hazan Samy * -* * -* Date: October 2006 * -* * -******************************************************************************/ + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 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: October 2006 * * + * * + ******************************************************************************/ /* $Id: getXmlChoicePage.php 52853 2007-08-24 17:55:26Z thomasr $ */ global $CFG; Modified: branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php 2008-03-12 21:16:29 UTC (rev 254) +++ branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php 2008-03-13 19:43:48 UTC (rev 255) @@ -1,32 +1,33 @@ <?PHP /****************************************************************************** -* * -* Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * -* * -* COPYRIGHT: * -* This software is the property of Horizon Wimba. * -* You can redistribute it and/or modify it under the terms of * -* the GNU General Public License as published by the * -* Free Software Foundation. * -* * -* WARRANTIES: * -* This software is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with the Horizon Wimba Moodle Integration; * -* if not, write to the Free Software Foundation, Inc., * -* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * -* * -* Author: Hazan Samy * -* * -* Date: October 2006 * -* * -******************************************************************************/ + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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. * + * ... [truncated message content] |
From: <tro...@us...> - 2008-03-12 21:16:31
|
Revision: 254 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=254&view=rev Author: trollinger Date: 2008-03-12 14:16:29 -0700 (Wed, 12 Mar 2008) Log Message: ----------- update the header of the file Modified Paths: -------------- trunk/moodle/mod/voicetools/lib.php Modified: trunk/moodle/mod/voicetools/lib.php =================================================================== --- trunk/moodle/mod/voicetools/lib.php 2008-03-05 23:02:06 UTC (rev 253) +++ trunk/moodle/mod/voicetools/lib.php 2008-03-12 21:16:29 UTC (rev 254) @@ -1,30 +1,30 @@ <?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 * -* * -******************************************************************************/ + * * + * Copyright (c) 1999-2008 Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of 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 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: lib.php 56815 2007-12-04 15:08:45Z thomasr $ */ /// Library of functions and constants for module voicetools This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-03-05 23:02:10
|
Revision: 253 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=253&view=rev Author: trollinger Date: 2008-03-05 15:02:06 -0800 (Wed, 05 Mar 2008) Log Message: ----------- Fix a bug on the calendar. The date on the moodle calendar was not the good one Modified Paths: -------------- branches/team/Thomas/moodle_3_1_2/mod/voicetools/mod.html Modified: branches/team/Thomas/moodle_3_1_2/mod/voicetools/mod.html =================================================================== --- branches/team/Thomas/moodle_3_1_2/mod/voicetools/mod.html 2008-03-05 23:01:52 UTC (rev 252) +++ branches/team/Thomas/moodle_3_1_2/mod/voicetools/mod.html 2008-03-05 23:02:06 UTC (rev 253) @@ -174,6 +174,8 @@ } $stringDate=""; +$eventDate=mktime(0,0,0,1,date('z',$course->startdate)+($sectionId-1)*7+1,date('y',$course->startdate)) ; + if($course->format == "topics" || $course->format == "social"){ } @@ -183,8 +185,7 @@ } 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); + $stringDate=date('m',$eventDate)."/".date('d',$eventDate)."/".date('Y',$eventDate); } // Visible to students or not @@ -1066,8 +1067,8 @@ <input type="hidden" name="modulename" value="<?php p($form->modulename) ?>"> <input type="hidden" name="instance" value="<?php p($form->instance) ?>"> <input type="hidden" name="mode" value="<?php p($form->mode) ?>"> - <input type="hidden" value="<?php echo $event->timestart;?>" name="calendar_start" id="calendar_start"> - <input type="hidden" value="<?php echo $course->startdate;?>" name="calendar_start" id="calendar_start"> + <input type="hidden" value="<?php echo $eventDate;?>" name="calendar_start" id="calendar_start"> + </form> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-03-05 23:01:57
|
Revision: 252 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=252&view=rev Author: trollinger Date: 2008-03-05 15:01:52 -0800 (Wed, 05 Mar 2008) Log Message: ----------- Fix a bug on the calendar. The date on the moodle calendar was not the good one Modified Paths: -------------- branches/team/Thomas/moodle_3_1_2/mod/liveclassroom/mod.html Modified: branches/team/Thomas/moodle_3_1_2/mod/liveclassroom/mod.html =================================================================== --- branches/team/Thomas/moodle_3_1_2/mod/liveclassroom/mod.html 2008-03-03 18:43:57 UTC (rev 251) +++ branches/team/Thomas/moodle_3_1_2/mod/liveclassroom/mod.html 2008-03-05 23:01:52 UTC (rev 252) @@ -174,6 +174,8 @@ } $stringDate=""; +$eventDate=mktime(0,0,0,1,date('z',$course->startdate)+($sectionId-1)*7+1,date('y',$course->startdate)) ; + if($course->format == "topics" || $course->format == "social"){ } @@ -183,8 +185,7 @@ } 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); + $stringDate=date('m',$eventDate)."/".date('d',$eventDate)."/".date('Y',$eventDate); } // Visible to students or not @@ -996,10 +997,8 @@ <input type="hidden" name=module value="<?php p($form->module) ?>" /> <input type="hidden" name=modulename value="<?php p($form->modulename) ?>" /> <input type="hidden" name=instance value="<?php p($form->instance) ?>" /> - <input type="hidden" name=mode value="<?php p($form->mode) ?>" /> - - <input type="hidden" value="<?php echo $event->timestart;?>" name="calendar_start" id="calendar_start"> - <input type="hidden" value="<?php echo $course->startdate;?>" name="calendar_start" id="calendar_start"> + <input type="hidden" name=mode value="<?php p($form->mode) ?>" /> + <input type="hidden" value="<?php echo $eventDate;?>" name="calendar_start" id="calendar_start"> </form> </div> <div id="hiddenDiv" class="opac"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-03-03 18:43:59
|
Revision: 251 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=251&view=rev Author: trollinger Date: 2008-03-03 10:43:57 -0800 (Mon, 03 Mar 2008) Log Message: ----------- Create a branch form 3.1.2 tag to fix bugs on the calendar Added Paths: ----------- branches/team/Thomas/moodle_3_1_2/ Copied: branches/team/Thomas/moodle_3_1_2 (from rev 250, 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-02-21 23:07:53
|
Revision: 250 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=250&view=rev Author: trollinger Date: 2008-02-21 15:07:51 -0800 (Thu, 21 Feb 2008) Log Message: ----------- Create a branche for Ashley to work on the moodle integration Added Paths: ----------- branches/team/Ashley/ Copied: branches/team/Ashley (from rev 249, 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-02-19 22:27:58
|
Revision: 249 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=249&view=rev Author: trollinger Date: 2008-02-19 14:27:56 -0800 (Tue, 19 Feb 2008) Log Message: ----------- Remove a couple of notice/warning error make sure using <?php instead of <? Modified Paths: -------------- branches/team/Thomas/moodle/mod/voicetools/mod.html branches/team/Thomas/moodle/mod/voicetools/view.php Modified: branches/team/Thomas/moodle/mod/voicetools/mod.html =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/mod.html 2008-02-19 22:22:47 UTC (rev 248) +++ branches/team/Thomas/moodle/mod/voicetools/mod.html 2008-02-19 22:27:56 UTC (rev 249) @@ -768,7 +768,7 @@ ?> </select> </td> - <? }?> + <?php }?> </td> <td align=left > <select id="start_hr" name="start_hr" <?php echo $disableAllElements ?>> @@ -824,7 +824,7 @@ </tr> <tr> <td align="right"> - <font class="fontCurrent"><? echo get_string('description_calendar', 'voicetools')?></font> + <font class="fontCurrent"><?php echo get_string('description_calendar', 'voicetools')?></font> </td> <td align=left > <textarea id="description" name="description" <?php echo $disableAllElements ?> rows="4" cols="30"><?php echo $description; ?></textarea> @@ -843,7 +843,7 @@ <?php print_string('activity_manageTools', 'voicetools')?></a> </td> - <td align="right" class="action" onclick="self.location.href='<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($course_id)?>'"> + <td align="right" class="action" onclick="self.location.href='<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($course_id)?>'"> <label><?php print_string('validationElement_cancel', 'voicetools')?></label> </td> <?php @@ -861,8 +861,7 @@ </tr> </table> </div> - - + <!-- These hidden variables are always the same --> <input type="hidden" name="course" value="<?php p($form->course) ?>"> <input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>"> @@ -888,12 +887,12 @@ <?php include($CFG->wwwroot."/mod/voicetools/popup.php?type=error"); ?> </div> -<? if($error==true){ ?> +<?php if($error==true){ ?> <script> docuament.getElementById("hiddenDiv").style.height=document.documentElement.clientHeight document.getElementById("hiddenDiv").style.width=document.documentElement.clientWidth document.getElementById("error").style.display="block"; document.getElementById("hiddenDiv").style.display="block"; </script> -<? } ?> +<?php } ?> Modified: branches/team/Thomas/moodle/mod/voicetools/view.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/view.php 2008-02-19 22:22:47 UTC (rev 248) +++ branches/team/Thomas/moodle/mod/voicetools/view.php 2008-02-19 22:27:56 UTC (rev 249) @@ -143,18 +143,18 @@ } function startVoiceBoard(){ - <? if(isset($roleSwitch) && $roleSwitch==true) { ?> + <?php if(isset($roleSwitch) && $roleSwitch==true) { ?> result=window.confirm("<?php echo get_string ('launchstudent', 'voicetools');?>"); if(result==true) { - doOpenPopup("<?php echo $servername ?>/<? echo $resource->getType();?>?action=display_popup&nid=<?php echo $vtSession->getNid() ?>","<?php echo $resource->getType()?>"); + doOpenPopup("<?php echo $servername ?>/<?php echo $resource->getType();?>?action=display_popup&nid=<?php echo $vtSession->getNid() ?>","<?php echo $resource->getType()?>"); } else { location.href= document.referrer; } - <? }else{ ?> - doOpenPopup("<?php echo $servername ?>/<? echo $resource->getType();?>?action=display_popup&nid=<?php echo $vtSession->getNid() ?>","<?php echo $resource->getType()?>"); - <? } ?> + <?php }else{ ?> + doOpenPopup("<?php echo $servername ?>/<?php echo $resource->getType();?>?action=display_popup&nid=<?php echo $vtSession->getNid() ?>","<?php echo $resource->getType()?>"); + <?php } ?> } </script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-02-19 22:22:48
|
Revision: 248 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=248&view=rev Author: trollinger Date: 2008-02-19 14:22:47 -0800 (Tue, 19 Feb 2008) Log Message: ----------- -Remove a couple of notice/warning error -make sure using <?php or not just <? -add popup.php 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/lib.php branches/team/Thomas/moodle/mod/liveclassroom/mod.html branches/team/Thomas/moodle/mod/liveclassroom/reports.php branches/team/Thomas/moodle/mod/liveclassroom/view.php branches/team/Thomas/moodle/mod/liveclassroom/welcome.php Added Paths: ----------- branches/team/Thomas/moodle/mod/liveclassroom/popup.php Modified: branches/team/Thomas/moodle/mod/liveclassroom/config.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/config.html 2008-02-19 22:22:47 UTC (rev 248) @@ -1,6 +1,7 @@ <?php require_once("lib/php/lc/LCAction.php"); require_once("lib/php/lc/lcapi.php"); + $lcApi=new LCApi($CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, $CFG->liveclassroom_adminpassword, $CFG->dataroot); Modified: branches/team/Thomas/moodle/mod/liveclassroom/css/StyleSheet.css =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/css/StyleSheet.css 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/css/StyleSheet.css 2008-02-19 22:22:47 UTC (rev 248) @@ -579,9 +579,9 @@ /*MessageBar*/ -#messageBar +#message { - width:99%; + width:699px; } .message @@ -591,7 +591,7 @@ bottom:4px; left:1px; right:1px; - height: 20px; + height: 25px; display: block; } @@ -680,19 +680,28 @@ font-size: 12px; } +div.advancedPopup,div.informationPopup { + position:absolute; + left:0px; + top:0px; + width:350px; + height:150px; + z-index: 50 !important;; + font-family:Verdana; + padding: 2px; + margin: 2px; + + display:none; +} + 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: 20%; +} + +div.informationPopup { + left: 40%; top: 30%; - display:none; } div.window-left { Modified: branches/team/Thomas/moodle/mod/liveclassroom/doAction.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-02-19 22:22:47 UTC (rev 248) @@ -40,9 +40,9 @@ require_once ("lib/php/common/XmlRoom.php"); require_once ("lib/php/common/WimbaXml.php"); -if (version_compare(PHP_VERSION, '5', '>=')) { - require_once ('lib/php/common/domxml-php4-php5.php'); -} +if (version_compare(PHP_VERSION,'5','>=')) { + require_once('lib/php/common/domxml-php4-php5.php'); +} $keys=array_merge(getKeysOfGeneralParameters(),getKeyWimbaClassroomForm()); @@ -54,7 +54,8 @@ $courseid = $params["enc_course_id"]; require_login($courseid); -$action = required_param('action', PARAM_ALPHA); +$action = $params["action"]; +$roomId = $params["resource_id"]; $createWorkflow = optional_param("createWorkflow", false, PARAM_BOOL); // course $session = new WimbaMoodleSession($params); @@ -84,37 +85,27 @@ else { $authToken = $api->getAuthoken(); - } - redirection($CFG->liveclassroom_servername . '/main/horizon_ui.pl.epl?'. - 'channel=' . $roomId . - '&hzA=' . $authToken); - exit; + } + + redirection( $CFG->liveclassroom_servername . '/main/horizon_ui.pl.epl?'. + 'channel=' . $api->getPrefix().$roomId . '&hzA=' . $authToken); break; case "create" : - $id = $api->createRoom(required_param('resource_id', PARAM_SAFEDIR), "false"); + $id = $api->createRoom($roomId, "false"); $messageAction = "created"; $messageProduct = "room"; break; case "update" : - - $roomId = required_param('resource_id', PARAM_SAFEDIR); $id = $api->createRoom($roomId, "true"); $messageAction = "updated"; $messageProduct = "room"; break; case "delete" : - if ($api->getPrefix() != "") - { - $roomId = trimPrefix(required_param('resource_id', PARAM_SAFEDIR), $api->getPrefix()); - } - else - { - $roomId = required_param('resource_id', PARAM_SAFEDIR); - } - $id = $api->deleteRoom($roomId); + + $id = $api->deleteRoom($roomId); //delte the activity linked to this room if (!liveclassroom_delete_all_instance_of_room($roomId)) { @@ -125,44 +116,37 @@ break; case "openContent" : - $roomId = required_param('resource_id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); redirection ($CFG->liveclassroom_servername . '/admin/class/carousels.epl?'. - 'class_id=' . $roomId . + 'class_id=' . $api->getPrefix().$roomId . '&hzA=' . $authToken . '&no_sidebar=1'); - exit (); break; case "openReport" : - $roomId = required_param('resource_id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); - redirection ('reports.php?id=' . $roomId . '&hzA=' . $authToken); + redirection ('reports.php?id=' . $api->getPrefix().$roomId . '&hzA=' . $authToken); exit (); break; case "openAdvancedMedia" : - $roomId = required_param('resource_id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); redirection ($CFG->liveclassroom_servername . '/admin/class/media.pl?'. - 'class_id=' . $roomId . + 'class_id=' . $api->getPrefix().$roomId . '&hzA=' . $authToken . '&no_sidebar=1'); exit (); break; case "openAdvancedRoom" : - $roomId = required_param('resource_id', PARAM_SAFEDIR); $authToken = $api->getAuthoken(); redirection ($CFG->liveclassroom_servername . '/admin/class/properties.pl?'. - 'class_id=' . $roomId . + 'class_id=' . $api->getPrefix().$roomId . '&hzA=' . $authToken . '&no_sidebar=1'); - exit (); break; case "getDialInformation" : - $roomId = required_param('resource_id', PARAM_SAFEDIR); $select_room = $api->getRoom($roomId); if ($params["studentView"] == "true" || $session->isInstructor() == false) @@ -177,24 +161,16 @@ 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()); + 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('resource_id', PARAM_SAFEDIR), $api->getPrefix()); - } - else - { - $roomId = required_param('resource_id', PARAM_SAFEDIR); - } $id = $api->createRoom($roomId, "true"); echo "good"; exit (); @@ -208,7 +184,7 @@ '&sesskey=' . sesskey() . '&id=' . $session->getCourseId() . '&add=liveclassroom'. - '&roomId=' . $api->getPrefix().$id ); + '&roomId=' . $id ); } else if ($action != "getDialInformation") { Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-02-19 22:22:47 UTC (rev 248) @@ -33,34 +33,37 @@ require_once("../../config.php"); require_once("lib.php"); +require_once("lib/php/common/WimbaLib.php"); require_once("lib/php/lc/LCAction.php"); + require_once("lib/php/common/WimbaCommons.php"); require_once("lib/php/common/WimbaUI.php"); require_once("lib/php/common/XmlArchive.php"); require_once("lib/php/common/XmlOrphanedArchive.php"); require_once("lib/php/common/XmlRoom.php"); require_once("lib/php/common/WimbaXml.php"); -require_once("lib/php/common/WimbaLib.php"); +$message=""; + if (version_compare(PHP_VERSION,'5','>=')) { require_once('lib/php/common/domxml-php4-php5.php'); } - foreach(getKeysOfGeneralParameters() as $param){ $value=optional_param($param["value"],$param["default_value"],$param["type"]); if($value!=null) $params[$param["value"]] = $value; } -require_login($params["en_course_id"]); +require_login($params["enc_course_id"]); if(isset($params["error"])) { - $display=$uiManager->setError(get_string ($params["error"], 'liveclassroon')); + $display=$uiManager->setError(get_string ($params["error"], 'liveclassroon')); } else { + $session=new WimbaMoodleSession($params); if(isset($params["messageProduct"]) && isset($params["messageAction"])) Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-02-19 22:22:47 UTC (rev 248) @@ -39,17 +39,23 @@ if (version_compare(PHP_VERSION,'5','>=')) { require_once('lib/php/common/domxml-php4-php5.php'); } - + +global $error; + $params = array (); -foreach(getKeysOfGeneralParameters() as $param){ +foreach(getKeysOfGeneralParameters() as $param) +{ $value=optional_param($param["value"],$param["default_value"],$param["type"]); if($value!=null) $params[$param["value"]] = $value; } +set_error_handler("manage_error"); + require_login($params["enc_course_id"]); $action = optional_param('action', PARAM_ALPHA); $currentIdtab = optional_param('idtab', null, PARAM_ALPHA); +$createWorkflow = optional_param('createWorkflow', false, PARAM_BOOL); // course $api=new LCAction($session,$CFG->liveclassroom_servername, $CFG->liveclassroom_adminusername, @@ -57,7 +63,7 @@ $uiManager=new WimbaUI($params,$api,$currentIdtab); if($uiManager->getSessionError()==false)//good -{ +{ if($action == 'update') { $roomId = required_param('resource_id', PARAM_SAFEDIR ); @@ -77,12 +83,7 @@ { $uiManager->setCurrentProduct("liveclassroom"); } - - if(isset($params["createWorkflow"]) && $params["createWorkflow"]=="true") - $createWorkflow= "true"; - else - $createWorkflow="false"; - + $uiManager->getLCSettingsView($action,$createWorkflow); } @@ -91,6 +92,11 @@ $uiManager->setError(get_string ('error_'.$uiManager->getSessionError(), 'liveclassroon')); } +if(!empty($error)) +{ + $uiManager->setError("cla merde"); +} + echo $uiManager->getXmlString(); Modified: branches/team/Thomas/moodle/mod/liveclassroom/index.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-02-19 22:22:47 UTC (rev 248) @@ -33,7 +33,9 @@ require_once("../../config.php"); + require_once("lib.php"); + require_once("lib/php/common/WimbaCommons.php"); require_once("lib/php/common/WimbaLib.php"); @@ -48,7 +50,7 @@ $strliveclassrooms = get_string("modulenameplural", "liveclassroom"); $strliveclassroom = get_string("modulename", "liveclassroom"); -$strname = $voicetool->name; + $navigation = array(); if ($course->id != SITEID) { Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib.php =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-02-19 22:22:47 UTC (rev 248) @@ -1,486 +1,458 @@ -<?PHP -/****************************************************************************** - * * +<?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. * - * * + * 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 * - * * + * 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: lib.php 200 2008-01-09 11:37:50Z trollinger $ */ +// / Library of functions and constants for module liveclassroom +if (!function_exists('getKeysOfGeneralParameters')) { + require_once('lib/php/common/WimbaLib.php'); +} +require_once($CFG->libdir . '/datalib.php'); -/// Library of functions and constants for module liveclassroom - -require_once($CFG->libdir.'/datalib.php'); - require_once("lib/php/lc/lcapi.php"); -require_once($CFG->dirroot.'/course/lib.php'); -require_once("lib/php/common/WimbaLib.php"); -define( 'WIMBA_DIR', $CFG->dataroot."/wimba"); -define( 'PRODUCT_DIR', $CFG->dataroot."/wimba/WC"); - -define('WIMBA_LOGS_DIR', $CFG->dataroot."/wimba/WC/logs"); define("LIVECLASSROOM_MODULE_VERSION", "3.1.2"); +define("WC", "liveclassroom"); -$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 - * @return nothing, but returns an error if the configuration is wrong + * + * @param $config - the information from the form mod.html + * @return nothing , but returns an error if the configuration is wrong */ -function liveclassroom_process_options (&$config) { - global $CFG, $USER; +function liveclassroom_process_options (&$config) +{ + global $CFG, $USER; + /******* + we do the following verfication before submitting the configuration + -The parameters sent can not be empty + -The url of the server can not finish with a / + -The url must start with http:// + -The api account has to valid + ********/ + + $config->servername = trim($config->servername); + $config->adminusername = trim($config->adminusername); + $config->adminpassword = trim($config->adminpassword); - $config->servername = trim($config->servername); - $config->adminusername = trim($config->adminusername); - $config->adminpassword = trim($config->adminpassword); + if (! isadmin($USER->id)) + { + wimba_add_log(WIMBA_ERROR,WC,get_string('wrongconfigurationURLunavailable', 'liveclassroom')); + error(get_string('errormustbeadmin', 'liveclassroom')); + } - if (! isadmin($USER->id)) { - error(get_string('errormustbeadmin', 'liveclassroom')); - } - - if(empty($config->servername)){ - error(get_string('wrongconfigurationURLunavailable', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); - } - else if(empty($config->adminusername)){ - error(get_string('emptyAdminUsername', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); - } - else if(empty($config->adminpassword)){ - error(get_string('emptyAdminPassword', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); - } + if (empty($config->servername)) + { + wimba_add_log(WIMBA_ERROR,WC,get_string('wrongconfigurationURLunavailable', 'liveclassroom')); + error(get_string('wrongconfigurationURLunavailable', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); + } + else if (empty($config->adminusername)) + { + wimba_add_log(WIMBA_ERROR,WC,get_string('emptyAdminUsername', 'liveclassroom')); + error(get_string('emptyAdminUsername', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); + } + else if (empty($config->adminpassword)) + { + wimba_add_log(WIMBA_ERROR,WC,get_string('emptyAdminPassword', 'liveclassroom')); + error(get_string('emptyAdminPassword', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); + } - $length = strlen($config->servername); - if ($config->servername{$length-1} == '/') { - error(get_String('trailingSlash', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); - } - if (!preg_match('/^http:\/\//', $config->servername)) { - error(get_String('trailingHttp', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); - } - $api=new LCApi($config->servername, - $config->adminusername, - $config->adminpassword); + $length = strlen($config->servername); + if ($config->servername {$length-1} == '/') + { + wimba_add_log(WIMBA_ERROR,WC,get_String('trailingSlash', 'liveclassroom')); + error(get_String('trailingSlash', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); + } + + if (!preg_match('/^http:\/\//', $config->servername)) + { + wimba_add_log(WIMBA_ERROR,WC,get_String('trailingHttp', 'liveclassroom')); + error(get_String('trailingHttp', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); + } - if (! $api->lcapi_authenticate()) { - error(get_string('wrongadminpass', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); - } - - return; -} + $api = new LCApi($config->servername, + $config->adminusername, + $config->adminpassword); + if (! $api->lcapi_authenticate()) + { + wimba_add_log(WIMBA_ERROR,WC,get_string('wrongadminpass', 'liveclassroom')); + error(get_string('wrongadminpass', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); + } + + return; +} + /* * Create a new instance of liveclassroom * @param $liveclassroom : object liveclassroom */ -function liveclassroom_add_instance($liveclassroom) { -/// Given an object containing all the necessary data, -/// (defined by the form in mod.html) this function -/// will create a new instance and return the id number -/// of the new instance. +function liveclassroom_add_instance($liveclassroom) +{ + // / Given an object containing all the necessary data, + // / (defined by the form in mod.html) this function + // / will create a new instance and return the id number + // / of the new instance. + $liveclassroom->timemodified = time(); + $api = new LCApi($CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword); + // May have to add extra stuff in here # + $roomname = $api->lcapi_get_room_name($liveclassroom->type); - $liveclassroom->timemodified = time(); - $api=new LCApi($CFG->liveclassroom_servername, - $CFG->liveclassroom_adminusername, - $CFG->liveclassroom_adminpassword); + if (!$result = insert_record("liveclassroom", $liveclassroom)) { + wimba_add_log(WIMBA_ERROR,WV,"Problem to add a new instance"); + $result = false; + } + + if (!isset($liveclassroom->section)) + { + $liveclassroom->section = 0; + } - # May have to add extra stuff in here # - $roomname = $api->lcapi_get_room_name($liveclassroom->type); - - if($result = insert_record("liveclassroom", $liveclassroom)) { - add_to_log($liveclassroom->course, "liveclassroom", "Add activity", - liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added"); - } - else { - add_to_log($liveclassroom->course, "liveclassroom", "Add activity", - liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added"); - $result=false; - } - if(!isset($liveclassroom->section)) - $liveclassroom->section=0; - - if($result!=false && isset($liveclassroom->calendar_event) && $liveclassroom->calendar_event==true) {//no problem - liveclassroom_addCalendarEvent($liveclassroom,$result,$roomname); - } else{ - liveclassroom_deleteCalendarEvent($result); - - } - wimba_add_log(1,"ssss"); - return true; -} - - -function liveclassroom_update_instance($liveclassroom) { -/// Given an object containing all the necessary data, -/// (defined by the form in mod.html) this function -/// will update an existing instance with new data. - - $liveclassroom->timemodified = time(); - $liveclassroom->id = $liveclassroom->instance; - $api=new LCApi($CFG->liveclassroom_servername, - $CFG->liveclassroom_adminusername, - $CFG->liveclassroom_adminpassword); - - # May have to add extra stuff in here # - $roomname = $api->lcapi_get_room_name($liveclassroom->type); + if ($result != false && isset($liveclassroom->calendar_event) && $liveclassroom->calendar_event == true) + { // no problem + liveclassroom_addCalendarEvent($liveclassroom, $result, $roomname); + } + else + { - // Need to update the section - - //get the course_module instance linked to the liveclassroom instance - if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) { - error("Course Module ID was incorrect"); - } - $old_section = $cm->section; - //Find the right section in the course_section - $section = get_record("course_sections", "id", $cm->section); + liveclassroom_deleteCalendarEvent($result); + } + + wimba_add_log(WIMBA_INFO,WC,"Add Instance".$result); + //for the debug + wimba_add_log(WIMBA_DEBUG,WC,print_r($liveclassroom, true )); + return true; +} - //delete in the course section - if (! delete_mod_from_section($cm->id, $cm->section)) { - $result = false; - error("Could not delete the $mod->modulename from that section"); - } - //update the course module section - if (! $sectionid = add_mod_to_section($liveclassroom) ) { - error("Could not add the new course module to that section"); - } - //update the course modules - if (! set_field("course_modules", "section", $sectionid, "id", $cm->id)) { - error("Could not update the course module with the correct section"); - } +function liveclassroom_update_instance($liveclassroom) +{ + // / Given an object containing all the necessary data, + // / (defined by the form in mod.html) this function + // / will update an existing instance with new data. + $liveclassroom->timemodified = time(); + $liveclassroom->id = $liveclassroom->instance; + $api = new LCApi($CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword); + // May have to add extra stuff in here # + $roomname = $api->lcapi_get_room_name($liveclassroom->type); + // Need to update the section + // get the course_module instance linked to the liveclassroom instance + if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) + { + wimba_add_log(WIMBA_ERROR,WC,"Problem to update the instance : ".$liveclassroom->id); + error("Course Module ID was incorrect"); + } + $old_section = $cm->section; + // Find the right section in the course_section + $section = get_record("course_sections", "id", $cm->section); + // delete in the course section + if (! delete_mod_from_section($cm->id, $cm->section)) + { + $result = false; + error("Could not delete the $mod->modulename from that section"); + } + // update the course module section + if (! $sectionid = add_mod_to_section($liveclassroom)) + { + wimba_add_log(WIMBA_ERROR,WC,"Problem to update the instance : ".$liveclassroom->id); + error("Could not add the new course module to that section"); + } + // update the course modules + if (! set_field("course_modules", "section", $sectionid, "id", $cm->id)) + { + wimba_add_log(WIMBA_ERROR,WC,"Problem to update the instance : ".$liveclassroom->id); + error("Could not update the course module with the correct section"); + } - add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", - liveclassroom_send_logs("updateInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), - "Activity ".$liveclassroom->name." has been updated with success"); - if(!isset($liveclassroom->section)) - $liveclassroom->section=0; + if (!isset($liveclassroom->section)) + { + $liveclassroom->section = 0; + } - $instanceNumber=update_record("liveclassroom", $liveclassroom); - if($instanceNumber!=false && isset($liveclassroom->calendar_event) && $liveclassroom->calendar_event==true) {//no problem - liveclassroom_addCalendarEvent($liveclassroom,$liveclassroom->instance,$roomname); - } - else - { - liveclassroom_deleteCalendarEvent($liveclassroom->instance); + $instanceNumber = update_record("liveclassroom", $liveclassroom); + if ($instanceNumber != false && isset($liveclassroom->calendar_event) && $liveclassroom->calendar_event == true) { // no problem + liveclassroom_addCalendarEvent($liveclassroom, $liveclassroom->instance, $roomname); + } + else + { + liveclassroom_deleteCalendarEvent($liveclassroom->instance); + } + return $instanceNumber; +} - } - return $instanceNumber; -} +function liveclassroom_delete_instance($id) +{ + // / 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, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword); -function liveclassroom_delete_instance($id) { -/// 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, - $CFG->liveclassroom_adminusername, - $CFG->liveclassroom_adminpassword); - - if (! $liveclassroom = get_record("liveclassroom", "id", "$id")) { - return false; - } - $roomname = $api->lcapi_get_room_name($liveclassroom->type); - $result = true; + if (! $liveclassroom = get_record("liveclassroom", "id", "$id")) + { + return false; + } + $roomname = $api->lcapi_get_room_name($liveclassroom->type); + $result = true; + // Delete any dependent records here # + if (! delete_records("liveclassroom", "id", $liveclassroom->id)) + { + wimba_add_log(WIMBA_ERROR,WC,"Problem to delete the instance : ".$liveclassroom->id); + $result = false; + } + + liveclassroom_deleteCalendarEvent("$liveclassroom->id"); + return $result; +} - # Delete any dependent records here # - - if (! delete_records("liveclassroom", "id", $liveclassroom->id)) { - add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("errorDeleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." deletion failed"); - $result = false; - } - add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("deleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been deleted with success"); - - liveclassroom_deleteCalendarEvent("$liveclassroom->id"); - return $result; -} - - - - - -function liveclassroom_user_outline($course, $user, $mod, $liveclassroom) { -/// Return a small object with summary information about what a -/// user has done with a given particular instance of this module -/// Used for user activity reports. -/// $return->time = the time they did it -/// $return->info = a short text description - +function liveclassroom_user_outline($course, $user, $mod, $liveclassroom) +{ + // / Return a small object with summary information about what a + // / user has done with a given particular instance of this module + // / Used for user activity reports. + // / $return->time = the time they did it + // / $return->info = a short text description return false; //$return; -} +} -function liveclassroom_user_complete($course, $user, $mod, $liveclassroom) { -/// Print a detailed representation of what a user has done with -/// a given particular instance of this module, for user activity reports. - +function liveclassroom_user_complete($course, $user, $mod, $liveclassroom) +{ + // / Print a detailed representation of what a user has done with + // / a given particular instance of this module, for user activity reports. return true; -} +} -function liveclassroom_print_recent_activity($course, $isteacher, $timestart) { -/// Given a course and a time, this module should find recent activity -/// that has occurred in liveclassroom activities and print it out. -/// Return true if there was output, or false is there was none. - +function liveclassroom_print_recent_activity($course, $isteacher, $timestart) +{ + // / Given a course and a time, this module should find recent activity + // / that has occurred in liveclassroom activities and print it out. + // / Return true if there was output, or false is there was none. global $CFG; - return false; // True if anything was printed, otherwise false -} + return false; // True if anything was printed, otherwise false +} -function liveclassroom_cron () { -/// Function to be run periodically according to the moodle cron -/// This function searches for things that need to be done, such -/// as sending out mail, toggling flags etc ... - +function liveclassroom_cron () +{ + // / Function to be run periodically according to the moodle cron + // / This function searches for things that need to be done, such + // / as sending out mail, toggling flags etc ... global $CFG; return true; -} +} -function liveclassroom_grades($liveclassroomid) { -/// Must return an array of grades for a given instance of this module, -/// indexed by user. It also returns a maximum allowed grade. -/// -/// $return->grades = array of grades; -/// $return->maxgrade = maximum allowed grade; -/// -/// return $return; +function liveclassroom_grades($liveclassroomid) +{ + // / Must return an array of grades for a given instance of this module, + // / indexed by user. It also returns a maximum allowed grade. + // / + // / $return->grades = array of grades; + // / $return->maxgrade = maximum allowed grade; + // / + // / return $return; + return null; +} - return NULL; -} - -function liveclassroom_get_participants($liveclassroomid) { -//Must return an array of user records (all data) who are participants -//for a given instance of liveclassroom. Must include every user involved -//in the instance, independient of his role (student, teacher, admin...) -//See other modules as example. - +function liveclassroom_get_participants($liveclassroomid) +{ + // Must return an array of user records (all data) who are participants + // for a given instance of liveclassroom. Must include every user involved + // in the instance, independient of his role (student, teacher, admin...) + // See other modules as example. return false; -} +} -function liveclassroom_scale_used ($liveclassroomid,$scaleid) { -//This function returns if a scale is being used by one liveclassroom -//it it has support for grading and scales. Commented code should be -//modified if necessary. See forum, glossary or journal modules -//as reference. - - $return = false; +function liveclassroom_scale_used ($liveclassroomid, $scaleid) +{ + // This function returns if a scale is being used by one liveclassroom + // it it has support for grading and scales. Commented code should be + // modified if necessary. See forum, glossary or journal modules + // as reference. + $return = false; - //$rec = get_record("liveclassroom","id","$liveclassroomid","scale","-$scaleid"); - // - //if (!empty($rec) && !empty($scaleid)) { - // $return = true; - //} - return $return; -} - -/******* -CALENDAR -******/ -function liveclassroom_addCalendarEvent($informations,$instanceNumber,$name){ - /// Basic event record for the database. - global $CFG; - - $oldEvent=get_record('event','instance',$instanceNumber); - - - $event = new Object(); - $event->name = $informations->name; - $event->description = $informations->description."<br><a href=".$CFG->wwwroot."/mod/liveclassroom/view.php?id=".$instanceNumber."&action=launchCalendar target=_self >".get_string("launch_calendar","liveclassroom")." ...</a>"; - $event->format = 1; - $event->userid = 0; - $event->courseid = $informations->course; //course event - $event->groupid = 0; - $event->modulename = 'liveclassroom'; - $event->instance = $instanceNumber; - $event->eventtype = ''; - $event->visible = 1; - if(isset($informations->start_month) && isset($informations->start_year))//tpics - $event->timestart = mktime($informations->start_hr,$informations->start_min,0,$informations->start_month,$informations->start_day,$informations->start_year); - - else{ - $event->timestart = mktime($informations->start_hr,$informations->start_min,0,date('m',$informations->calendar_start),date('d',$informations->calendar_start),date('Y',$informations->calendar_start)); - } - - $duration = $informations->duration_hr*3600 + $informations->duration_min*60; - if ($duration < 0){ - $event->timeduration = 0; - } - else { - $event->timeduration = $duration; - } +} - $event->timemodified = time(); - - if(!empty($oldEvent) && $oldEvent!=false) //old event exsit - { - $event->id = $oldEvent->id ; - $result=update_record('event', $event); - - } - else - { - - $result = insert_record('event', $event); - } - - return $result; -} +/** + * CALENDAR + */ +function liveclassroom_addCalendarEvent($informations, $instanceNumber, $name) +{ + // / Basic event record for the database. + global $CFG; -function liveclassroom_deleteCalendarEvent($instanceNumber){ - /// Basic event record for the database. - global $CFG; - $oldEvent=get_record('event','instance',$instanceNumber); - - if(!empty($oldEvent) && $oldEvent!=false){ - $result=delete_records("event", "id", $oldEvent->id); - } - else - { - return false; - } - return $result; + $event = new Object(); + $event->name = $informations->name; + $event->description = $informations->description . "<br><a href=" . $CFG->wwwroot . "/mod/liveclassroom/view.php?id=" . $instanceNumber . "&action=launchCalendar target=_self >" . get_string("launch_calendar", "liveclassroom") . " ...</a>"; + $event->format = 1; + $event->userid = 0; + $event->courseid = $informations->course; //course event + $event->groupid = 0; + $event->modulename = 'liveclassroom'; + $event->instance = $instanceNumber; + $event->eventtype = ''; + $event->visible = 1; + $event->timemodified = time(); + + if($activity_informations->course_format !="weeks" && $activity_informations->course_format !="weekscss") + {//tppics or social + $event->timestart = mktime($activity_informations->start_hr,$activity_informations->start_min,0,$activity_informations->start_month,$activity_informations->start_day,$activity_informations->start_year); + if( $event->timestart < time()) + { + error(get_string("date_error","liveclassroom"),$_SERVER["HTTP_REFERER"]); + } + } + else + { + $event->timestart = mktime($activity_informations->start_hr,$activity_informations->start_min,0,date('m',$activity_informations->calendar_start),date('d',$activity_informations->calendar_start),date('Y',$activity_informations->calendar_start)); + } + + $duration = $informations->duration_hr*3600 + $informations->duration_min*60; + if ($duration < 0) + { + $event->timeduration = 0; + } + else + { + $event->timeduration = $duration; + } + + wimba_add_log(WIMBA_DEBUG,WC,"Add calendar event\n".print_r($event, true )); -} - /** -* get the calendar event which matches the id -* @param $id - the voicetool instance -* @return the calendar event or false -*/ -function liveclassroom_get_event_calendar($id) { + if(!$oldEvent=get_record('event','instance',$activity_informations->id)) //old event exsit + { + $event->id = $oldEvent->id ; + $result=update_record('event', $event); + } + else + { + $result = insert_record('event', $event); + } + return $result; +} - $event = get_record('event','instance',$id); - if($event==false || empty($event)) { - - return false; - } - return $event; -} +function liveclassroom_deleteCalendarEvent($instanceNumber) +{ + // / Basic event record for the database. + global $CFG; + $oldEvent = get_record('event', 'instance', $instanceNumber); + if (!empty($oldEvent) && $oldEvent != false) { + $result = delete_records("event", "id", $oldEvent->id); + } else { + return false; + } + return $result; +} +/** + * get the calendar event which matches the id + * + * @param $id - the voicetool instance + * @return the calendar event or false + */ +function liveclassroom_get_event_calendar($id) +{ + $event = get_record('event', 'instance', $id); + if ($event == false || empty($event)) { + return false; + } + return $event; +} + /* * Give the shortname for a courseid given * @param $courseid : the id of the course * Return a string : the shortname of the course -*/ -function liveclassroom_get_course_shortname($courseid) { - - if(!($course = get_record('course','id',$courseid))) { - //error( "Response get room name: query to database failed"); - return false; - } - - // $name = $course->shortname; +*/ +function liveclassroom_get_course_shortname($courseid) +{ + if (!($course = get_record('course', 'id', $courseid))) + { + // error( "Response get room name: query to database failed"); + return false; + } + // $name = $course->shortname; return $course->shortname; - -} +} /* -* List all the activities for a course given ans a type of Room -* @param $course : the course -* @param $roomnase = the name of the room -* Return a table with the activities name -*/ -function liveclassroom_get_activities_list_per_room($course,$roomname) { - - if(!($activity_list = get_records('liveclassroom','course',$course->id))) { - error( "Response get_activities_list : query to database failed"); - } - - $i=0; - foreach($activity_list as $liveclassroom) { - if($liveclassroom->type==$roomname) { - $list_return[$i] = $liveclassroom->name; - $i++; - } - } - - return $list_return; -} - - -/* * Delete all the activities on Moodle database for a room given * @praram $roomid : the id of the room associated to the activities * return a boolean true if all is well done */ -function liveclassroom_delete_all_instance_of_room($roomid) { -/// Given an ID of an instance of this module, -/// this function will permanently delete the instance -/// and any data that depends on it. - $api=new LCApi($CFG->liveclassroom_servername, - $CFG->liveclassroom_adminusername, - $CFG->liveclassroom_adminpassword); - - $result = true; - if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) { - $roomname = $api->lcapi_get_room_name($liveclassroom->type); +function liveclassroom_delete_all_instance_of_room($roomid) +{ + // / Given an ID of an instance of this module, + // / this function will permanently delete the instance + // / and any data that depends on it. + $api = new LCApi($CFG->liveclassroom_servername, + $CFG->liveclassroom_adminusername, + $CFG->liveclassroom_adminpassword); - # Delete any dependent records here # - foreach($liveclassrooms as $liveclassroom){ - - //get the course_module instance linked to the liveclassroom instance - if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) { - error("Course Module ID was incorrect"); - } - if (! delete_course_module($cm->id)) { - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllcm","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)"); - $result = false; - //Delete a course module and any associated data at the course level (events) - // notify("Could not delete the $cm->id (coursemodule)"); - } - if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) { - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAlldb","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database"); - $result = false; + $result = true; + if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) + { + $roomname = $api->lcapi_get_room_name($liveclassroom->type); + // Delete any dependent records here # + foreach($liveclassrooms as $liveclassroom) + { + // get the course_module instance linked to the liveclassroom instance + if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) + { + error("Course Module ID was incorrect"); + } + if (! delete_course_module($cm->id)) + { + wimba_add_log(WIMBA_ERROR,WC,"Problem to delete the course module : ".$cm->id); + $result = false; + // Delete a course module and any associated data at the course level (events) + // notify("Could not delete the $cm->id (coursemodule)"); + } + if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) + { + wimba_add_log(WIMBA_ERROR,WC,"Problem to delete all the activities associated to the voice tools"); + $result = false; + } + // delete in the course section too + if (! delete_mod_from_section($cm->id, "$cm->section")) + { + wimba_add_log(WIMBA_ERROR,WC,"Could not delete the ".$cm->id." from that section : ".$cm->section); + $result = false; + // notify("Could not delete the $mod->modulename from that section"); + } } - //delete in the course section too - if (! delete_mod_from_section($cm->id, "$cm->section")) { - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllsection","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section"); - $result = false; - //notify("Could not delete the $mod->modulename from that section"); - } - - } - } - - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("deleteAll","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have been deleted with success"); - + } + return $result; -} +} -/* -* Send info to the logs system -* @param $type : type of the log -* @param $parameters : string with the parameters needed -* return a string which is the link to the logs file -*/ -function liveclassroom_send_logs($type,$parameters) { - - global $LIVECLASSROOM_LOGS; - - - $link = $LIVECLASSROOM_LOGS."?type=$type"; - $link .= "&$parameters"; - $link .= "&time=".time(); - - return $link; -} - ?> Modified: branches/team/Thomas/moodle/mod/liveclassroom/mod.html =================================================================== --- branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-02-19 22:21:27 UTC (rev 247) +++ branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-02-19 22:22:47 UTC (rev 248) @@ -1,6 +1,4 @@ -<!-- This page defines the form to create or edit an instance of this module --> -<!-- It is used from /course/mod.php. The whole instance is available as $form. --> -<?PHP +<?php /****************************************************************************** * * * Copyright (c) 1999-2007 Horizon Wimba, All Rights Reserved. * @@ -32,13 +30,15 @@ require_once("../config.php"); require_once($CFG->dirroot.'/calendar/lib.php'); -include_once($CFG->dirroot.'/mod/liveclassroom/lib.php'); -include_once($CFG->dirroot.'/mod/liveclassroom/lib/php/lc/LCAction.php'); +require_once($CFG->dirroot.'/mod/liveclassroom/lib/php/common/WimbaLib.php'); +require_once($CFG->dirroot.'/mod/liveclassroom/lib.php'); +require_once($CFG->dirroot.'/mod/liveclassroom/lib/php/lc/LCAction.php'); require_once($CFG->dirroot.'/version.php'); //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"); @@ -49,11 +49,12 @@ $roomId = optional_param('roomId',null, PARAM_RAW); $update = optional_param('update', null, PARAM_INT); $sectionId = optional_param('section', 0, PARAM_INT); +$error=false; -$lcApi=new LCAction(null,$CFG->liveclassroom_servername, +$api=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)) { @@ -88,7 +89,10 @@ $event=false; $description=""; $stringDate=""; -//check if a calendar event exist +$checked =""; +$disabledCheckbox=""; +$disableAllElements="disabled"; + if(isset($update)) { //update @@ -106,35 +110,46 @@ $event=liveclassroom_get_event_calendar($activity->id); - if( $event==true)//no event + if( $event==true) { - $checked ="checked"; + $disableAllElements=""; + $checked ="checked"; 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 +else {//new - $checked ="checked"; + $checked =""; $name=""; -} -//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) + if($course->format == "weeks" && $sectionId == 0) + { + $disabledCheckbox="disabled"; + $disableAllElements="disabled"; + + } + 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); + } +} + +if($course->format == "weeks" || $course->format == "weekscss" && $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); + $disabledCheckbox="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 { - $disabledCheckbox=""; - $disableAllElements=""; -} - + $disabledCheckbox=""; +} // Visible to students or not if ($form->coursemodule) @@ -161,13 +176,15 @@ ?> <link rel="STYLESHEET" href="<?php p($CFG->wwwroot) ?>/mod/liveclassroom/css/StyleSheet.css"" type="text/css" /> <style> -body{ - font-size:14px; +body +{ + font-size:14px; } .content { - margin:-5px; + margin:-5px; } + </style> <script type="text/javascript"> @@ -186,10 +203,11 @@ } document.getElementById("form").submit(); } + function TestNoRoom() { <?php - $rooms = $lcApi->getRooms($course->id."_T"); + $rooms = $api->getRooms($course->id."_T"); if($rooms==false){ ?> </script> @@ -310,7 +328,10 @@ if(document.getElementById("description")!=null) { createCookie("description_disabled",document.getElementById("description").disabled); - } + } + if(document.getElementById("comment_date")!=null){ + createCookie("comment_date",document.getElementById("comment_date").innerHTML); + } //launch the workflow location.href = "<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>&createWorkflow=true"; } @@ -360,7 +381,7 @@ ?> document.getElementById("start_month").disabled=value; document.getElementById("start_year").disabled=value; - <? } ?> + <?php } ?> } @@ -414,7 +435,7 @@ } if(document.getElementById("calendar_event")!=null && readCookie("calendar_event")!=null) { - document.getElementById("calendar_event").checked=readCookie("calendar_event"); + document.getElementById("calendar_event").checked=booleanValue(readCookie("calendar_event")); document.getElementById("calendar_event").disabled=booleanValue(readCookie("calendar_event_disabled")); deleteCookie("calendar_event"); deleteCookie("calendar_event_disabled"); @@ -477,8 +498,13 @@ document.getElementById("description").disabled=booleanValue(readCookie("description_disabled")); deleteCookie("description"); deleteCookie("description_disabled"); - } - change(); + } + if(document.getElementById("comment_date")!=null && readCookie("comment_date")!=null) + { + document.getElementById("comment_date").innerHTML=readCookie("comment_date"); + deleteCookie("comment_date"); + } + } function loadPage(){ @@ -495,7 +521,7 @@ <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"> + <img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/lib/web/pictures/items/headerbar-logo.png"> </td> <td align="right" class="headerBarRight"> @@ -519,7 +545,7 @@ <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> + <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 ?>"> @@ -571,16 +597,17 @@ <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)) + if( ($roomId==$room->getRoomId()) || ($update!=false && $api->getPrefix().$room->getRoomId()==$activity->type)) { - echo "<OPTION selected VALUE=".$lcApi->getPrefix().$room->getRoomId().">".$name."</OPTION>"; + echo "<OPTION selected VALUE=".$api->getPrefix().$room->getRoomId().">".$name."</OPTION>"; } else { - echo "<OPTION VALUE=".$lcApi->getPrefix().$room->getRoomId().">".$name."</OPTION>"; + echo "<OPTION VALUE=".$api->getPrefix().$room->getRoomId().">".$name."</OPTION>"; } } } @@ -620,9 +647,9 @@ </tr> <tr> - <td align=right style="width:220px"> <?php if($course->format == "weeks" || $course->format == "weekscss"){?> + <td align=right style="width:180px"> <select style="float:left" id="start_day" name= "start_day" onchange="change()" <?php echo $disableAllElements ?>> <?php for($i=0;$i<7;$i++){ @@ -634,8 +661,10 @@ ?> </select> <label id="comment_date"><?php echo $stringDate;?></label> + </td> <? }else if($course->format == "topics" || $course->format == "social" || $course->format == "site"){?> + <td align=right style="width:240px"> <select id="start_month" name="start_month" <?php echo $disableAllElements ?>> <?php for($i=1;$i<=12;$i++){ @@ -666,9 +695,9 @@ } ?> </select> - <? }?> + </td> + <?php }?> - </td> <td align=left > <select id="start_hr" name="start_hr" <?php echo $disableAllElements ?>> <?php @@ -723,7 +752,7 @@ </tr> <tr> <td align="right"> - <font class="fontCurrent"><? echo get_string('description_calendar', 'liveclassroom')?></font> + <font class="fontCurrent"><?php 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> @@ -738,7 +767,7 @@ <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;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>"> + <td align="left"><img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/lib/web/pictures/items/listitem-liveclassroomicon.gif" ><a class="list" href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $id;?>"> <?php print_string('activity_manageTools', 'liveclassroom')?></a> </td> <td id="setting_Create" class="action" align="right" onclick="self.location.href='<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($id)?>'"> @@ -773,35 +802,21 @@ <div id="hiddenDiv" class="opac"> <!--[if lte IE 6.5]><iframe></iframe><![endif]--> </div> -<div class="advancedPopup" id="popup"> - <div class="window-left"> - </div> - <div class="window-middle"> - <table width="100%" border="0" cellpadding="5" cellspacing="3" style="padding:0px"> - <tr> - <td class="popupTitle" colspan="3"> - <?php echo get_string("activity_welcome_to_wimba","liveclassroom") ?></td> - <td align="left"><img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/buttons/x_squared.png" id="IMG1" onclick="javascript:popupCancel()" width="15px"> </td> - </tr> - - <tr> - <td colspan="3"> - <img alt="" src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/voice_tools.png" id="picture" style="float:left;"... [truncated message content] |
From: <tro...@us...> - 2008-02-19 22:21:30
|
Revision: 247 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=247&view=rev Author: trollinger Date: 2008-02-19 14:21:27 -0800 (Tue, 19 Feb 2008) Log Message: ----------- Remove a couple of notice/warning error Modified Paths: -------------- branches/team/Thomas/integrations_common/php/common/WimbaLib.php branches/team/Thomas/integrations_common/php/common/WimbaUI.php branches/team/Thomas/integrations_common/php/common/WimbaXml.php branches/team/Thomas/integrations_common/php/common/XmlArchive.php branches/team/Thomas/integrations_common/php/common/XmlRoom.php branches/team/Thomas/integrations_common/php/lc/LCAction.php branches/team/Thomas/integrations_common/php/lc/LCRoom.php branches/team/Thomas/integrations_common/php/lc/lcapi.php Modified: branches/team/Thomas/integrations_common/php/common/WimbaLib.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-02-19 22:21:27 UTC (rev 247) @@ -42,13 +42,18 @@ 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" => "enabled_student_eboard", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "enabled_students_breakoutrooms", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "enabled_students_mainrooms", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "enabled_status", "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) + array("value" => "userlimit", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "userlimitValue", "type" => PARAM_INT, "default_value" => -1) ) ; } @@ -400,10 +405,14 @@ WIMBA_ERROR => 4 ); global $CFG; - + $log_product = $product."_log_level"; + + if(!isset($CFG->$log_product)){ + $CFG->$log_product=2;//default to Info + } //Write on the logs only if the configured level allows it. - if ($product=="general" ||$level_values[$level] >= $CFG->$log_product){ + if ($product=="general" || $level_values[$level] >= $CFG->$log_product){ // Gets the site shortname $site = get_record('course','id',SITEID); Modified: branches/team/Thomas/integrations_common/php/common/WimbaUI.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-02-19 22:21:27 UTC (rev 247) @@ -36,11 +36,13 @@ /** * Configure different parmaters used to generate the xml according to the current product * @param product : the product which will be display (liveclassroom or voicetools) - * @param object : contains the informations get from the server - * @param objectInformations : contains the informations get from the database + * @param $serverInformations : contains the informations get from the server + * @param $databaseInformations : contains the informations get from the database */ - function setCurrentProduct($product, $serverInformations = NULL, $databaseInformations = NULL) + function setCurrentProduct($product, $serverInformations = NULL, $databaseInformations= NULL) { + + $this->product = $product; $this->currentObject = $serverInformations; @@ -52,15 +54,17 @@ if ($product == "liveclassroom") { + if(isset($this->currentObject)) $roomId=$this->currentObject->getRoomId(); + if ($this->currentObject != null && $this->currentObject->isArchive()) { $this->isArchive = "true"; } - - $roomId=$this->currentObject->getRoomId(); + $courseId=$this->session->getCourseId() . "_S"; $isStudentAdmin= $this->api->isStudentAdmin($roomId, $courseId); + if ($this->currentObject == null || $this->currentObject != null && $isStudentAdmin == "false") { @@ -372,6 +376,7 @@ /******** SESSION *********/ + $this->xml->CreateInformationElement( $this->session->timeOfLoad, $this->session->hparams["firstname"], @@ -385,7 +390,7 @@ HEADER *********/ $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "true", "true"); - + if($update=="update") { $this->xml->addContextBarElement( @@ -630,7 +635,10 @@ $parameters["disabled"] = "true"; } - $roomId=$this->currentObject->getRoomId(); + $roomId=""; + if(isset($this->currentObject)) + $roomId=$this->currentObject->getRoomId(); + $courseId=$this->session->getCourseId() . "_S"; $isStudentAdmin= $this->api->isStudentAdmin($roomId, $courseId); if ($this->currentObject == null || $isStudentAdmin == "false") { @@ -1258,7 +1266,7 @@ } else { - if ($this->isLectureRoom == false || $this->currentObject->isArchive()) + if ($this->isLectureRoom == false || isset( $this->currentObject ) && $this->currentObject->isArchive()) { $this->xml->createPanelSettings( get_string("tab_title_chat", 'liveclassroom'), Modified: branches/team/Thomas/integrations_common/php/common/WimbaXml.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaXml.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/common/WimbaXml.php 2008-02-19 22:21:27 UTC (rev 247) @@ -55,11 +55,11 @@ if($this->error==NULL) { - - $root->append_child($this->Informations); + if(isset($this->Informations)) + $root->append_child($this->Informations); + foreach ($this->part as $key => $value) { - $windows->append_child($this->addWindowsElement($key, $value)); } } Modified: branches/team/Thomas/integrations_common/php/common/XmlArchive.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/XmlArchive.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/common/XmlArchive.php 2008-02-19 22:21:27 UTC (rev 247) @@ -11,6 +11,7 @@ var $nameDisplay; var $preview; var $url; + var $param; var $url_params; var $tooltipAvailability; var $tooltipDial; Modified: branches/team/Thomas/integrations_common/php/common/XmlRoom.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/XmlRoom.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/common/XmlRoom.php 2008-02-19 22:21:27 UTC (rev 247) @@ -4,13 +4,14 @@ * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates - */ + */ class XmlRoom{ var $id; var $nameDisplay; var $preview; + var $param; var $launchUrl; var $url_params; var $tooltipAvailability; @@ -78,7 +79,7 @@ $preview->append_child($xml->create_text_node($this->preview)); $launchUrl = $xml->create_element("url"); - $launchUrl->append_child($xml->create_text_node($this->launchUrl); + $launchUrl->append_child($xml->create_text_node($this->launchUrl)); $param = $xml->create_element("param"); $param->append_child($xml->create_text_node($this->param)); @@ -143,8 +144,7 @@ function setArchive($archives) { $this->archives=$archives; } - - + } Modified: branches/team/Thomas/integrations_common/php/lc/LCAction.php =================================================================== --- branches/team/Thomas/integrations_common/php/lc/LCAction.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/lc/LCAction.php 2008-02-19 22:21:27 UTC (rev 247) @@ -51,6 +51,7 @@ */ function createFirstTime() { + if ($this->api->lcapi_get_users($this->getStudentUserid()) == false) { // create the two users @@ -272,7 +273,7 @@ } return false; } - function getPhoneNumbers($room_id, $user_id) + function getPhoneNumbers() { return $this->api->lcapi_get_simulcast(); } Modified: branches/team/Thomas/integrations_common/php/lc/LCRoom.php =================================================================== --- branches/team/Thomas/integrations_common/php/lc/LCRoom.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/lc/LCRoom.php 2008-02-19 22:21:27 UTC (rev 247) @@ -8,7 +8,7 @@ require_once("PrefixUtil.php"); // Constants -define(" ATTRIB_ROOM_DESCRIPTION", "description"); +define("ATTRIB_ROOM_DESCRIPTION", "description"); define("ATTRIB_ROOM_LONG_NAME", "longname"); define("ATTRIB_ROOM_IS_ARCHIVE", "archive"); define("ATTRIB_ROOM_ID", "class_id"); @@ -139,57 +139,58 @@ function setByRecord($currentRecord, $prefix) { + // room attributes - $rid = trimPrefix($currentRecord[ATTRIB_ROOM_ID], $prefix); + $rid = trimPrefix($this->getKeyValue($currentRecord,ATTRIB_ROOM_ID), $prefix); $this->setRoomId($rid); - $this->setDescription($currentRecord[ATTRIB_ROOM_DESCRIPTION]); - $this->setLongname($currentRecord[ATTRIB_ROOM_LONG_NAME]); - $this->setContactEmail($currentRecord[ATTRIB_ROOM_CONTACT_EMAIL]); - $this->setArchive($currentRecord[ATTRIB_ROOM_ARCHIVE]); - $this->setPreview($currentRecord[ATTRIB_ROOM_PREVIEW]); - $this->setBORAutoMoveInstructors($currentRecord[ATTRIB_BOR_AUTO_MOVE_INSTRUCTORS]); - $this->setBORAutoMoveSelf($currentRecord[ATTRIB_BOR_AUTO_MOVE_SELF]); - $this->setBORCarouselsPublic($currentRecord[ATTRIB_BOR_CAROUSELS_PUBLIC]); - $this->setBOREnabled($currentRecord[ATTRIB_BOR_ENABLED]); - $this->setBORInitialNumber($currentRecord[ATTRIB_BOR_INITIAL_NUMBER]); - $this->setBORShowRoomCarousels($currentRecord[ATTRIB_BOR_SHOW_ROOM_CAROUSELS]); - $this->setUserstatusEnabled($currentRecord[ATTRIB_ROOM_USERSTATUS_ENABLED]); - $this->setSendUserstatusUpdates($currentRecord[ATTRIB_ROOM_SEND_USERSTATUS_UPDATES]); + $this->setDescription($this->getKeyValue($currentRecord,ATTRIB_ROOM_DESCRIPTION)); + $this->setLongname($this->getKeyValue($currentRecord,ATTRIB_ROOM_LONG_NAME)); + $this->setContactEmail($this->getKeyValue($currentRecord,ATTRIB_ROOM_CONTACT_EMAIL)); + $this->setArchive($this->getKeyValue($currentRecord,ATTRIB_ROOM_ARCHIVE)); + $this->setPreview($this->getKeyValue($currentRecord,ATTRIB_ROOM_PREVIEW)); + $this->setBORAutoMoveInstructors($this->getKeyValue($currentRecord,ATTRIB_BOR_AUTO_MOVE_INSTRUCTORS)); + $this->setBORAutoMoveSelf($this->getKeyValue($currentRecord,ATTRIB_BOR_AUTO_MOVE_SELF)); + $this->setBORCarouselsPublic($this->getKeyValue($currentRecord,ATTRIB_BOR_CAROUSELS_PUBLIC)); + $this->setBOREnabled($this->getKeyValue($currentRecord,ATTRIB_BOR_ENABLED)); + $this->setBORInitialNumber($this->getKeyValue($currentRecord,ATTRIB_BOR_INITIAL_NUMBER)); + $this->setBORShowRoomCarousels($this->getKeyValue($currentRecord,ATTRIB_BOR_SHOW_ROOM_CAROUSELS)); + $this->setUserstatusEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_USERSTATUS_ENABLED)); + $this->setSendUserstatusUpdates($this->getKeyValue($currentRecord,ATTRIB_ROOM_SEND_USERSTATUS_UPDATES)); // Media Settings // Compatible with LC 5.X - $this->setHmsSimulcast($currentRecord[ATTRIB_ROOM_HMS_SIMULCAST]); - $this->setHmsSimulcastRestricted($currentRecord[ATTRIB_ROOM_HMS_SIMULCAST_RESTRICTED]); - $this->setHmsTwoWayEnabled($currentRecord[ATTRIB_ROOM_HMS_TWO_WAY_ENABLED]); - $this->setMediaFormat($currentRecord[ATTRIB_ROOM_MEDIA_FORMAT]); - $this->setMediaType($currentRecord[ATTRIB_ROOM_MEDIA_TYPE]); - $this->setVideoFrameWidth($currentRecord[ATTRIB_ROOM_VF_WIDTH]); - $this->setVideoFrameHeight($currentRecord[ATTRIB_ROOM_VF_HEIGHT]); - $this->setVideoFrameLocation($currentRecord[ATTRIB_ROOM_VF_LOCATION]); - $this->setVideoFrameSet($currentRecord[ATTRIB_ROOM_VIDEOFRAMESET]); - $this->setStudentVideoOnStartupEnabled($currentRecord[ATTRIB_ROOM_ENABLE_STUDENT_VIDEO_ON_STARTUP]); - // setVideoWindowSizeOnStartup((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_WINDOW_SIZE_ON_STARTUP]); - // setVideoWindowEncodingSize((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_WINDOW_ENCODING_SIZE]); - // setVideoDefaultBitRate((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_DEFAULT_BIT_RATE]); - // setVideoBitRateCeiling((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_BIT_RATE_CEILING]); - $this->setVideoBandwidth($currentRecord[ATTRIB_ROOM_HMS_VIDEO_BANDWIDTH]); + $this->setHmsSimulcast($this->getKeyValue($currentRecord,ATTRIB_ROOM_HMS_SIMULCAST)); + $this->setHmsSimulcastRestricted($this->getKeyValue($currentRecord,ATTRIB_ROOM_HMS_SIMULCAST_RESTRICTED)); + $this->setHmsTwoWayEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_HMS_TWO_WAY_ENABLED)); + $this->setMediaFormat($this->getKeyValue($currentRecord,ATTRIB_ROOM_MEDIA_FORMAT)); + $this->setMediaType($this->getKeyValue($currentRecord,ATTRIB_ROOM_MEDIA_TYPE)); + $this->setVideoFrameWidth($this->getKeyValue($currentRecord,ATTRIB_ROOM_VF_WIDTH)); + $this->setVideoFrameHeight($this->getKeyValue($currentRecord,ATTRIB_ROOM_VF_HEIGHT)); + $this->setVideoFrameLocation($this->getKeyValue($currentRecord,ATTRIB_ROOM_VF_LOCATION)); + $this->setVideoFrameSet($this->getKeyValue($currentRecord,ATTRIB_ROOM_VIDEOFRAMESET)); + $this->setStudentVideoOnStartupEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_ENABLE_STUDENT_VIDEO_ON_STARTUP)); + // setVideoWindowSizeOnStartup((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_WINDOW_SIZE_ON_STARTUP)); + // setVideoWindowEncodingSize((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_WINDOW_ENCODING_SIZE)); + // setVideoDefaultBitRate((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_DEFAULT_BIT_RATE)); + // setVideoBitRateCeiling((String)currentRecord[ATTRIB_ROOM_HMS_VIDEO_BIT_RATE_CEILING)); + $this->setVideoBandwidth($this->getKeyValue($currentRecord,ATTRIB_ROOM_HMS_VIDEO_BANDWIDTH)); // Advanced settings - $this->setArchiveEnabled($currentRecord[ATTRIB_ROOM_CAN_ARCHIVE]); - $this->setEboardEnabled($currentRecord[ATTRIB_ROOM_CAN_EBOARD]); - $this->setLiveShareEnabled($currentRecord[ATTRIB_ROOM_CAN_LIVESHARE]); - $this->setLogChatEnabled($currentRecord[ATTRIB_ROOM_CAN_LOGCHAT]); - $this->setMoveStudentEnabled($currentRecord[ATTRIB_ROOM_CAN_MOVE_STUDENT]); - $this->setPptImportEnabled($currentRecord[ATTRIB_ROOM_CAN_PPT_IMPORT]); - $this->setShowWebEnabled($currentRecord[ATTRIB_ROOM_CAN_SHOW_WEB]); - $this->setChatEnabled($currentRecord[ATTRIB_ROOM_CHATENABLE]); - $this->setPrivateChatEnabled($currentRecord[ATTRIB_ROOM_PRIVATECHATENABLE]); - $this->setStudentWhiteboardEnabled($currentRecord[ATTRIB_ROOM_STUDENT_WB_ENABLED]); - $this->setStudentLiveAppEnabled($currentRecord[ATTRIB_ROOM_STUDENT_WB_LIVEAPP]); + $this->setArchiveEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CAN_ARCHIVE)); + $this->setEboardEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CAN_EBOARD)); + $this->setLiveShareEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CAN_LIVESHARE)); + $this->setLogChatEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CAN_LOGCHAT)); + $this->setMoveStudentEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CAN_MOVE_STUDENT)); + $this->setPptImportEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CAN_PPT_IMPORT)); + $this->setShowWebEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CAN_SHOW_WEB)); + $this->setChatEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_CHATENABLE)); + $this->setPrivateChatEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_PRIVATECHATENABLE)); + $this->setStudentWhiteboardEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_STUDENT_WB_ENABLED)); + $this->setStudentLiveAppEnabled($this->getKeyValue($currentRecord,ATTRIB_ROOM_STUDENT_WB_LIVEAPP)); // Access - $this->setUserLimit($currentRecord[ATTRIB_ROOM_USERLIMIT]); + $this->setUserLimit($this->getKeyValue($currentRecord,ATTRIB_ROOM_USERLIMIT)); // PINs are compatible with LC 4.3.0+ - $this->setParticipantPin($currentRecord[ATTRIB_ROOM_PARTICIPANT_PIN]); - $this->setPresenterPin($currentRecord[ATTRIB_ROOM_PRESENTER_PIN]); + $this->setParticipantPin($this->getKeyValue($currentRecord,ATTRIB_ROOM_PARTICIPANT_PIN)); + $this->setPresenterPin($this->getKeyValue($currentRecord,ATTRIB_ROOM_PRESENTER_PIN)); } /** @@ -338,7 +339,7 @@ */ function isValidRoomId($id) { - if (id != null && ereg(ACCEPTABLE_ROOM_ID_REGEX, $id) > 0) { + if ($id != null && ereg(ACCEPTABLE_ROOM_ID_REGEX, $id) > 0) { return true; } else { return true; @@ -725,6 +726,13 @@ { return $this->attributes; } + + function getKeyValue($tab,$key){ + if(array_key_exists($key,$tab)){ + return $tab[$key]; + } + return ""; + } } ?> Modified: branches/team/Thomas/integrations_common/php/lc/lcapi.php =================================================================== --- branches/team/Thomas/integrations_common/php/lc/lcapi.php 2008-02-18 19:22:56 UTC (rev 246) +++ branches/team/Thomas/integrations_common/php/lc/lcapi.php 2008-02-19 22:21:27 UTC (rev 247) @@ -102,7 +102,9 @@ define("LCAPI_DELAY", 1800); // validity time of an auth request in seconds class LCApi { + var $_lcapi_config; + var $cookie_tstamp=null; var $cookie_file = null; var $valid = null; // Command @@ -175,7 +177,7 @@ if (!isset ($this->_lcapi_config)) { // $this->lcapi_error(self::LCAPI_ENOCONF); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); return false; } $url = $this->_lcapi_config->server . LCAPI_COMMAND . LCAPI_FUNCTION_NOOP . "&AuthType=AuthCookieHandler" . "&AuthName=Horizon" . "&credential_0=" . $this->_lcapi_config->login . "&credential_1=" . $this->_lcapi_config->password; @@ -191,20 +193,20 @@ curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": executing request: " . $url); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": executing request: " . $url); $data = curl_exec($ch); if (curl_errno($ch)) { $this->lcapi_error(LCAPI_EADDR); - wimba_add_error(WIMBA_ERROR,WC,"HTTP Request failed: " . curl_error($ch)); + wimba_add_log(WIMBA_ERROR,WC,"HTTP Request failed: " . curl_error($ch)); return false; } preg_match("(\d*)", $data, $matches); $resp_code = $matches[0]; if ($resp_code == 204) { $this->lcapi_error(LCAPI_EAUTH); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Authentication failed (204)"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Authentication failed (204)"); return false; } else @@ -212,13 +214,13 @@ if ($resp_code != 100 && $resp_code != 301) { $this->lcapi_error(LCAPI_EAUTH); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Authentication Failed: $resp_code"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Authentication Failed: $resp_code"); return false; } } curl_close($ch); - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Authentication successful"); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": Authentication successful"); return $ch; } @@ -237,25 +239,26 @@ if (!isset ($this->_lcapi_config)) { // $this->lcapi_error(self::LCAPI_ENOCONF); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); return false; } // $this->cookie_tstamp = $this->_lcapi_config->tmppath.self::LCAPI_COOKIE_TSTAMP; //Open the temp file to check the last modification date $this->cookie_file = $this->_lcapi_config->tmppath . LCAPI_COOKIE_FILE; // Cookie File path - // echo $this->cookie_file; - // echo "eee".file_exists($this->cookie_tstamp); - // /if (file_exists($this->cookie_tstamp)) { - // $this->tstamp = time(); - // echo $tstamp; - // } - - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": cookie timestamp:" . $this->tstamp); + $this->cookie_tstamp = $this->_lcapi_config->tmppath.LCAPI_COOKIE_TSTAMP; //Open the temp file to check the last modification date + + + if(file_exists($this->cookie_tstamp)) { + $this->tstamp = file_get_contents($this->cookie_tstamp); + } + + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": cookie timestamp:" . $this->tstamp); + $this->valid = $this->tstamp + LCAPI_DELAY; // 1800 seconds = 30 minutes if ((!file_exists($this->cookie_file)) || time() > $this->valid) { - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Timestamp too old (tstamp: $tstamp, valid: $valid), re-auth necessary."); - + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": Timestamp too old (tstamp: $this->tstamp, valid: $this->valid), re-auth necessary."); + if (!$ch = $this->lcapi_authenticate()) { return false; @@ -264,7 +267,6 @@ } $url = $this->_lcapi_config->server . LCAPI_COMMAND . $function . $params; - $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); @@ -273,17 +275,17 @@ curl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookie_file); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": executing request: " . $url); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": executing request: " . $url); $response = curl_exec($ch); if (curl_errno($ch)) { $this->lcapi_error(LCAPI_ECURL); - wimba_add_error(WIMBA_ERROR,WC,"Curl error: " . curl_error($ch)); + wimba_add_log(WIMBA_ERROR,WC,"Curl error: " . curl_error($ch)); return false; } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Request Returned: " . $response); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": Request Returned: " . $response); return $response; } /** @@ -294,7 +296,7 @@ * @param $lastname string - LC User last name. * @return bool - true if the user is successfuly created or already exist, false otherwise */ - function lcapi_create_user($userid, $firstname, $lastname) + function lcapi_create_user($userid, $firstname="", $lastname="") { $params = "&target=" . $this->prefix . $userid . "&first_name=$firstname&last_name=$lastname"; $enc_params = str_replace(" ", "+", $params); @@ -304,18 +306,17 @@ if ($lc_respcode == 301) { $this->lcapi_error(LCAPI_EEXIST); - - wimba_add_error(WIMBA_DEBUG,WC,"User ($this->prefix.$userid, $firstname, $lastname) already exist, not created."); + wimba_add_log(WIMBA_DEBUG,WC,"User ($this->prefix.$userid, $firstname, $lastname) already exist, not created."); return false; } if ($lc_respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": User Creation Failed for ($this->prefix.$userid, $firstname, $lastname) with $lc_respcode"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": User Creation Failed for ($this->prefix.$userid, $firstname, $lastname) with $lc_respcode"); return false; } - wimba_add_error(WIMBA_DEBUG,WC,"User ($this->prefix.$userid, $firstname, $lastname) created."); + wimba_add_log(WIMBA_DEBUG,WC,"User ($this->prefix.$userid, $firstname, $lastname) created."); return true; } @@ -339,7 +340,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ENOSESN); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Create Session ($respcode)."); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Create Session ($respcode)."); return false; } $currentline = strtok($response, "\n"); @@ -350,18 +351,18 @@ if (empty ($currentline)) { $this->lcapi_error(LCAPI_ENOSESN); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Session was returned with good code, but session not available ($enc_params => $response)"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Session was returned with good code, but session not available ($enc_params => $response)"); return false; } $authtoken = substr($currentline, 10); if (empty ($authtoken)) { $this->lcapi_error(LCAPI_ENOSESN); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Token empty, response: $response"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Token empty, response: $response"); return false; } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Auth OK (hzA=$authtoken)"); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": Auth OK (hzA=$authtoken)"); return $authtoken; } /** @@ -405,17 +406,17 @@ if ($respcode == 301) { $this->lcapi_error(LCAPI_EEXIST); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Class ($roomid, $roomname) already exist, not created"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Class ($roomid, $roomname) already exist, not created"); return false; } if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Create Class with id : $roomid, and name : $roomname."); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Create Class with id : $roomid, and name : $roomname."); return false; } - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Class ($roomid, $roomname) created with success."); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Class ($roomid, $roomname) created with success."); return true; } /** @@ -437,11 +438,11 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Add Role $role to userid $userid in Class with id:$roomid"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Add Role $role to userid $userid in Class with id:$roomid"); return false; } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Role $role added for $userid in Class $roomid"); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": Role $role added for $userid in Class $roomid"); return true; } /** @@ -464,11 +465,11 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Removed Role $role from userid $this->prefix.$userid in Class with id:" . $roomid); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Removed Role $role from userid $this->prefix.$userid in Class with id:" . $roomid); return false; } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Role $role removed from $userid in Class $roomid"); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": Role $role removed from $userid in Class $roomid"); return true; } /** @@ -485,7 +486,7 @@ if ($respcode == 302) { $this->lcapi_error(LCAPI_ECRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": $roomid suppression failed"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": $roomid suppression failed"); return false; } else @@ -493,12 +494,12 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": $roomid suppression failed for an unknown reason (response: $response)"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": $roomid suppression failed for an unknown reason (response: $response)"); return false; } } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": $roomid deleted successfully."); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": $roomid deleted successfully."); return true; } /** @@ -526,11 +527,11 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_CRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Room modification failed ($roomid): $response"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Room modification failed ($roomid): $response"); return false; } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . "$roomid has been modified with success"); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . "$roomid has been modified with success"); return true; } /** @@ -544,7 +545,7 @@ function lcapi_get_archives($userid, $roomid = '') { $result = $this->lcapi_get_rooms($this->prefix . $userid, $this->prefix . $roomid, 1); - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning archives for '$this->prefix.$userid' and '$this->prefix.$roomid': " . print_r($result, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning archives for '$this->prefix.$userid' and '$this->prefix.$roomid': " . print_r($result, true)); return $result; } /** @@ -568,7 +569,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": List of room query failed"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": List of room query failed"); return false; } list (, $body) = explode("\n", $response, 2); @@ -579,13 +580,15 @@ $lines = explode("\n", $records[$i]); $record = null; foreach ($lines as $line) - { - list ($key, $value) = explode('=', $line); - - if (!empty ($key) && $key != "") - { - $record[$key] = $value; - } + { + if(!empty($line)){ + list ($key, $value) = explode('=', $line); + + if (!empty ($key) && $key != "") + { + $record[$key] = $value; + } + } } if ((empty ($roomid) && !empty ($record)) || // orphaned archive or room @@ -597,7 +600,7 @@ } } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": retrieved Rooms for $userid and roomid '$roomid': " . print_r($rooms, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": retrieved Rooms for $userid and roomid '$roomid': " . print_r($rooms, true)); return $rooms; } /** @@ -631,16 +634,15 @@ } $request = str_replace(" ", "+", $request); $response = $this->lcapi_send_query(LCAPI_FUNCTION_LIST_USER, $request); - if (LCAPI_DEBUG) - { - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": request '$request', response: $response"); - } + + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": request '$request', response: $response"); + preg_match("(\d*)", $response, $matches); $respcode = $matches[0]; if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Unable to query the server. request: '$request', response: '$response'"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Unable to query the server. request: '$request', response: '$response'"); return false; } list (, $body) = explode("\n", $response, 2); @@ -655,13 +657,15 @@ $lines = explode("\n", $record); $empty = true; foreach ($lines as $line) { - - list ($key, $value) = explode('=', $line); - if (!empty ($key)) - { - $answer[$key] = $value; - $empty = false; - } + if(!empty($line)){ + list ($key, $value) = explode('=', $line); + + if (!empty ($key)) + { + $answer[$key] = $value; + $empty = false; + } + } } if (!$empty) { @@ -669,7 +673,7 @@ } } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning answers: " . print_r($answers, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning answers: " . print_r($answers, true)); return $answer; } @@ -696,16 +700,16 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": request '$params', response: $reponse"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": request '$params', response: $reponse"); return false; } // Some dichotomy to retreive the role name list (, $body) = explode("\n", $response, 2); - $records = explode(LCAPI_RECORD_SEPERATOR, $body); + $records = explode(LCAPI_RECORD_SEPARATOR, $body); $result = explode(LCAPI_ATTR_ROLEID . "=", $records[0]); $result = explode("\n", $result[1]); - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning answer: " . $result[0]); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning answer: " . $result[0]); return $result[0]; } @@ -724,7 +728,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot perform query: $params, reponse: $response"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot perform query: $params, reponse: $response"); return false; } list (, $body) = explode("\n", $response, 2); @@ -747,7 +751,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": cannot retrieve the room name"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": cannot retrieve the room name"); return false; } list (, $body) = explode("\n", $response, 2); @@ -755,15 +759,17 @@ $lines = explode("\n", $records[0]); foreach ($lines as $line) { - list ($key, $value) = explode("=", $line); - if ($key == LCAPI_ATTR_LONGNAME) - { - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": $this->prefix.$roomid's room name is $value"); - return $value; - } + if(!empty($line)){ + list ($key, $value) = explode("=", $line); + if ($key == LCAPI_ATTR_LONGNAME) + { + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": $this->prefix.$roomid's room name is $value"); + return $value; + } + } } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": did not find name of room: $roomid"); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": did not find name of room: $roomid"); return false; } @@ -782,7 +788,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot query the media type of $roomid"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot query the media type of $roomid"); return false; } list (, $body) = explode("\n", $response, 2); @@ -790,15 +796,17 @@ $lines = explode("\n", $records[0]); foreach ($lines as $line) { - list ($key, $value) = explode("=", $line); - if ($key == LCAPI_ATTR_MEDIATYPE) - { - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": $roomid's media type is $value"); - return $value; - } - - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": did not find media type for $roomid"); - return false; + if(!empty($line)){ + list ($key, $value) = explode("=", $line); + if ($key == LCAPI_ATTR_MEDIATYPE) + { + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": $roomid's media type is $value"); + return $value; + } + + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": did not find media type for $roomid"); + return false; + } } } /** @@ -810,6 +818,7 @@ */ function lcapi_get_room_info($roomid) { + $roominfo=array(); $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); @@ -818,25 +827,28 @@ if ($respcode != 100) { // $this->lcapi_error(self::LCAPIEQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": cannot query room info for $roomid"); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": cannot query room info for $roomid"); return false; } + list (, $body) = explode("\n", $response, 2); $records = explode(LCAPI_RECORD_SEPARATOR, $body); $lines = explode("\n", $records[0]); foreach ($lines as $line) { - list ($key, $value) = explode("=", $line); - if (!empty ($key)) - { - $roominfo[$key] = $value; + if(!empty($line)){ + list ($key, $value) = explode("=", $line); + if (!empty ($key)) + { + $roominfo[$key] = $value; + } } } $room = new LCRoom(); - $room->setByRecord($roominfo, $this->prefix);. + $room->setByRecord($roominfo, $this->prefix); - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning room info for $roomid: " . print_r($roominfo, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning room info for $roomid: " . print_r($roominfo, true)); return $room; } @@ -853,7 +865,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); return false; } list (, $body) = explode("\n", $response, 2); @@ -861,11 +873,13 @@ $lines = explode("\n", $records[0]); foreach ($lines as $line) { - list ($key, $value) = explode("=", $line); - $answer[trim($key)] = trim($value); + if(!empty($line)){ + list ($key, $value) = explode("=", $line); + $answer[trim($key)] = trim($value); + } } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server status: " . print_r($answer, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server status: " . print_r($answer, true)); return $answer; } @@ -882,20 +896,22 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); return false; } list (, $body) = explode("\n", $response, 2); $records = explode(LCAPI_RECORD_SEPARATOR, $body); foreach ($records as $record) { - $lines = explode("\n", $record); - list (, $key) = explode("=", $lines[0], 2); - list (, $value) = explode("=", $lines[1], 2); - $answers[trim($key)] = trim($value); + if(!empty($record)){ + $lines = explode("\n", $record); + list (, $key) = explode("=", $lines[0], 2); + list (, $value) = explode("=", $lines[1], 2); + $answers[trim($key)] = trim($value); + } } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server config: " . print_r($answers, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server config: " . print_r($answers, true)); return $answers; } @@ -907,20 +923,22 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); + wimba_add_log(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); return false; } list (, $body) = explode("\n", $response, 2); $records = explode(LCAPI_RECORD_SEPARATOR, $body); foreach ($records as $record) { - $lines = explode("\n", $record); - list (, $key) = explode("=", $lines[0], 2); - list (, $value) = explode("=", $lines[1], 2); - $answers[trim($key)] = trim($value); + if(!empty($record)){ + $lines = explode("\n", $record); + list (, $key) = explode("=", $lines[0], 2); + list (, $value) = explode("=", $lines[1], 2); + $answers[trim($key)] = trim($value); + } } - wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server config: " . print_r($answers, true)); + wimba_add_log(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server config: " . print_r($answers, true)); return $answers; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-02-18 19:22:58
|
Revision: 246 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=246&view=rev Author: trollinger Date: 2008-02-18 11:22:56 -0800 (Mon, 18 Feb 2008) Log Message: ----------- add a missing file "popup.php" Modified Paths: -------------- branches/team/Thomas/moodle/mod/voicetools/lib.php branches/team/Thomas/moodle/mod/voicetools/mod.html Added Paths: ----------- branches/team/Thomas/moodle/mod/voicetools/popup.php Modified: branches/team/Thomas/moodle/mod/voicetools/lib.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lib.php 2008-02-15 19:09:14 UTC (rev 245) +++ branches/team/Thomas/moodle/mod/voicetools/lib.php 2008-02-18 19:22:56 UTC (rev 246) @@ -35,9 +35,6 @@ require_once($CFG->dirroot.'/course/lib.php'); require_once('lib/php/vt/WimbaVoicetoolsAPI.php'); - - - define("VOICETOOLS_MODULE_VERSION", "3.1.2"); define("WV", "voicetools"); Modified: branches/team/Thomas/moodle/mod/voicetools/mod.html =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/mod.html 2008-02-15 19:09:14 UTC (rev 245) +++ branches/team/Thomas/moodle/mod/voicetools/mod.html 2008-02-18 19:22:56 UTC (rev 246) @@ -39,17 +39,17 @@ require_once($CFG->dirroot.'/version.php'); //test if the current user can see this page -require_login($course->id); +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"); + error("You need to be a teacher in this course to create an instance"); } - + //get the required parameters $course_id = optional_param('id', 0, PARAM_INT); $resource_id = optional_param('rid',null, PARAM_RAW); $update = optional_param('update', null, PARAM_INT); $sectionId = optional_param('section', null, PARAM_INT); - + /// First we check that form variables have been initialised if (!isset($form->name)) { @@ -80,19 +80,19 @@ $disableAllElements="disabled"; //check if a calendar event exist if(isset($update)){ //update - - //get the information of the activity - if (! $cmVT = get_record("course_modules", "id", $update)) + + //get the information of the activity + if (! $cmVT = get_record("course_modules", "id", $update)) { - return false; - } - $course_id=$cmVT->course; - - $activity = get_record("voicetools", "id", $cmVT->instance ); - $sectionId=$activity->section; - $resource_id = $activity->rid; + return false; + } + $course_id=$cmVT->course; + + $activity = get_record("voicetools", "id", $cmVT->instance ); + $sectionId=$activity->section; + $resource_id = $activity->rid; - $event=voicetools_get_event_calendar($activity->id); + $event=voicetools_get_event_calendar($activity->id); if($event==true) { $disableAllElements=""; @@ -100,12 +100,12 @@ list($description,$link)=split("<br>",$event->description); $stringDate=date('m',$event->timestart)."/".date('d',$event->timestart)."/".date('Y',$event->timestart); } - $completeName=explode(" - ", $activity->name); + $completeName=explode(" - ", $activity->name); $name=$completeName[1]; } else {//new - $checked =""; + $checked =""; $name=""; if($course->format == "weeks" && $sectionId == 0) @@ -121,39 +121,39 @@ } //manage the state of the calendar form -//it is disabled for the Introduction section (week 0) of a weekly course +//it is disabled for the Introduction section (week 0) of a weekly course if($course->format == "weeks" || $course->format == "weekscss" && $sectionId != 0) { - $disabledCheckbox="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); + $disabledCheckbox="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 { - $disabledCheckbox=""; -} + $disabledCheckbox=""; +} // Visible to students or not if ($form->coursemodule) { - $visible = get_field('course_modules', 'visible', 'id', $form->coursemodule); + $visible = get_field('course_modules', 'visible', 'id', $form->coursemodule); } else { - $visible = true; + $visible = true; } if ($form->mode == 'add') { // in this case $form->section is the section number, not the id - $hiddensection = !get_field('course_sections', 'visible', 'section', $form->section, 'course', $form->course); + $hiddensection = !get_field('course_sections', 'visible', 'section', $form->section, 'course', $form->course); } else { - $hiddensection = !get_field('course_sections', 'visible', 'id', $form->section); + $hiddensection = !get_field('course_sections', 'visible', 'id', $form->section); } if ($hiddensection) { - $visible = false; + $visible = false; } //get the list of resource available @@ -161,232 +161,224 @@ $vtResources=voicetools_api_get_resources($resourcesRid["rid"]); if($vtResources==null) { - $error=true; + $error=true; } - + ?> <link rel="STYLESHEET" href="<?php p($CFG->wwwroot) ?>/mod/voicetools/css/StyleSheet.css"" type="text/css" /> <style> body { - font-size:14px; + font-size:14px; } .content { - margin:-5px; + margin:-5px; } -.jY0YJb { -background-color:#C3D9FF; -border:3px solid #C3D9FF; -left:0pt; -position:absolute; -top:0pt; -width:450px; -z-index:501; -} + </style> -<script type="text/javascript"> +<script type="text/javascript"> //cookie management function createCookie(name,value,days) { - if (days) { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - var expires = "; expires="+date.toGMTString(); - } - else var expires = ""; - document.cookie = name+"="+value+expires+"; path=/"; + if (days) { + var date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + var expires = "; expires="+date.toGMTString(); + } + else var expires = ""; + document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - for(var i=0;i < ca.length;i++) - { - var c = ca[i]; - while (c.charAt(0)==' '){ + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) + { + var c = ca[i]; + while (c.charAt(0)==' '){ c = c.substring(1,c.length); - } - if (c.indexOf(nameEQ) == 0) - { + } + if (c.indexOf(nameEQ) == 0) + { return c.substring(nameEQ.length,c.length); } - } - return null; + } + return null; } function deleteCookie(name) { - createCookie(name,"",-1); + createCookie(name,"",-1); } function booleanValue(value){ - if(value=="false") - { - return false; - } - else - { - return true; + if(value=="false") + { + return false; } + else + { + return true; + } } function validate(){ - + // name can't be null - if(document.getElementById("name").value == "") - { + if(document.getElementById("name").value == "") + { alert("Please a name is required."); return false; - } - else if(document.getElementById("name").value.length>=255) - { + } + else if(document.getElementById("name").value.length>=255) + { alert("Please choose an activity name that is less than 255 characters."); return false; - } - else if(document.getElementById("resource").value=="empty") - { + } + else if(document.getElementById("resource").value=="empty") + { alert("Please select a Voice Tools."); return false; - } + } document.getElementById("form").submit(); } function TestNoTool() { - <?php - $listTools = voicetools_get_voicetools_list($course->id); - if($listTools==NULL) { //no voice tools available - wimba_add_log(WIMBA_INFO, WV, "Mod.html : no voicetools created on the course ". $course->id); - ?> - document.getElementById("hiddenDiv").style.height=document.documentElement.clientHeight - document.getElementById("hiddenDiv").style.width=document.documentElement.clientWidth - document.getElementById("popup").style.display="block"; - document.getElementById("hiddenDiv").style.display="block"; - <?php - } - ?> - + <?php + $listTools = voicetools_get_voicetools_list($course->id); + if($listTools==NULL) { //no voice tools available + wimba_add_log(WIMBA_INFO, WV, "Mod.html : no voicetools created on the course ". $course->id); + ?> + document.getElementById("hiddenDiv").style.height=document.documentElement.clientHeight + document.getElementById("hiddenDiv").style.width=document.documentElement.clientWidth + document.getElementById("popup").style.display="block"; + document.getElementById("hiddenDiv").style.display="block"; + <?php + } + ?> + } function popupCancel(){ - document.getElementById("popup").style.display="none"; - document.getElementById("hiddenDiv").style.display="none"; - location.href = "<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($course_id)?>"; + document.getElementById("popup").style.display="none"; + document.getElementById("hiddenDiv").style.display="none"; + location.href = "<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($course_id)?>"; } function popupOk(){ - document.getElementById("popup").style.display="none"; - document.getElementById("hiddenDiv").style.display="none"; - location.href = "<?php echo $CFG->wwwroot;?>/mod/voicetools/index.php?id=<?php echo $course_id;?>&createWorkflow=true"; + document.getElementById("popup").style.display="none"; + document.getElementById("hiddenDiv").style.display="none"; + location.href = "<?php echo $CFG->wwwroot;?>/mod/voicetools/index.php?id=<?php echo $course_id;?>&createWorkflow=true"; } function LaunchCreateWorkflow(){ //save the form fields - if(document.getElementById("name")!=null) - { - createCookie("name",document.getElementById("name").value); - } - - if(document.getElementById("section")!=null) - { - createCookie("section",document.getElementById("section").selectedIndex); - } - - if(document.getElementById("menuvisible")!=null) - { - createCookie("menuvisible",document.getElementById("menuvisible").selectedIndex); - } - //calendar - if(document.getElementById("calendar_event")!=null) - { - createCookie("calendar_event",document.getElementById("calendar_event").checked); - } - - if(document.getElementById("start_month")!=null) - { - createCookie("start_month",document.getElementById("start_month").selectedIndex); - } - - if(document.getElementById("start_day")!=null) - { - createCookie("start_day",document.getElementById("start_day").selectedIndex); - } - - if(document.getElementById("start_year")!=null) - { - createCookie("start_year",document.getElementById("start_year").selectedIndex); - } - - if(document.getElementById("start_hr")!=null) - { - createCookie("start_hr",document.getElementById("start_hr").selectedIndex); - } - - if(document.getElementById("start_min")!=null) - { - createCookie("start_min",document.getElementById("start_min").selectedIndex); - } - - if(document.getElementById("duration_hr")!=null) - { - createCookie("duration_hr",document.getElementById("duration_hr").selectedIndex); - } - - if(document.getElementById("duration_min")!=null) - { - createCookie("duration_min",document.getElementById("duration_min").selectedIndex); - } - - if(document.getElementById("description")!=null) - { - createCookie("description",document.getElementById("description").value); - } - - //manage the availability of the calendar - if(document.getElementById("calendar_event")!=null) - { - createCookie("calendar_event_disabled",document.getElementById("calendar_event").disabled); - } - - if(document.getElementById("start_month")!=null) - { - createCookie("start_month_disabled",document.getElementById("start_month").disabled); - } - - if(document.getElementById("start_day")!=null) - { - createCookie("start_day_disabled",document.getElementById("start_day").disabled); - } - - if(document.getElementById("start_year")!=null) - { - createCookie("start_year_disabled",document.getElementById("start_year").disabled); - } - - if(document.getElementById("start_hr")!=null) - { - createCookie("start_hr_disabled",document.getElementById("start_hr").disabled); - } - - if(document.getElementById("start_min")!=null) - { - createCookie("start_min_disabled",document.getElementById("start_min").disabled); - } - if(document.getElementById("duration_hr")!=null) - { - createCookie("duration_hr_disabled",document.getElementById("duration_hr").disabled); - } - - if(document.getElementById("duration_min")!=null) - { - createCookie("duration_min_disabled",document.getElementById("duration_min").disabled); - } - - if(document.getElementById("description")!=null) - { - createCookie("description_disabled",document.getElementById("description").disabled); + if(document.getElementById("name")!=null) + { + createCookie("name",document.getElementById("name").value); } + + if(document.getElementById("section")!=null) + { + createCookie("section",document.getElementById("section").selectedIndex); + } + + if(document.getElementById("menuvisible")!=null) + { + createCookie("menuvisible",document.getElementById("menuvisible").selectedIndex); + } + //calendar + if(document.getElementById("calendar_event")!=null) + { + createCookie("calendar_event",document.getElementById("calendar_event").checked); + } + + if(document.getElementById("start_month")!=null) + { + createCookie("start_month",document.getElementById("start_month").selectedIndex); + } + + if(document.getElementById("start_day")!=null) + { + createCookie("start_day",document.getElementById("start_day").selectedIndex); + } + + if(document.getElementById("start_year")!=null) + { + createCookie("start_year",document.getElementById("start_year").selectedIndex); + } + + if(document.getElementById("start_hr")!=null) + { + createCookie("start_hr",document.getElementById("start_hr").selectedIndex); + } + + if(document.getElementById("start_min")!=null) + { + createCookie("start_min",document.getElementById("start_min").selectedIndex); + } + + if(document.getElementById("duration_hr")!=null) + { + createCookie("duration_hr",document.getElementById("duration_hr").selectedIndex); + } + + if(document.getElementById("duration_min")!=null) + { + createCookie("duration_min",document.getElementById("duration_min").selectedIndex); + } + + if(document.getElementById("description")!=null) + { + createCookie("description",document.getElementById("description").value); + } + + //manage the availability of the calendar + if(document.getElementById("calendar_event")!=null) + { + createCookie("calendar_event_disabled",document.getElementById("calendar_event").disabled); + } + + if(document.getElementById("start_month")!=null) + { + createCookie("start_month_disabled",document.getElementById("start_month").disabled); + } + + if(document.getElementById("start_day")!=null) + { + createCookie("start_day_disabled",document.getElementById("start_day").disabled); + } + + if(document.getElementById("start_year")!=null) + { + createCookie("start_year_disabled",document.getElementById("start_year").disabled); + } + + if(document.getElementById("start_hr")!=null) + { + createCookie("start_hr_disabled",document.getElementById("start_hr").disabled); + } + + if(document.getElementById("start_min")!=null) + { + createCookie("start_min_disabled",document.getElementById("start_min").disabled); + } + if(document.getElementById("duration_hr")!=null) + { + createCookie("duration_hr_disabled",document.getElementById("duration_hr").disabled); + } + + if(document.getElementById("duration_min")!=null) + { + createCookie("duration_min_disabled",document.getElementById("duration_min").disabled); + } + + if(document.getElementById("description")!=null) + { + createCookie("description_disabled",document.getElementById("description").disabled); + } if(document.getElementById("comment_date")!=null){ createCookie("comment_date",document.getElementById("comment_date").innerHTML); } @@ -395,152 +387,152 @@ function hideCalendarEvent(value){ - if(value=="check") - { - if(document.getElementById("calendar_event").checked==true) - { - value=""; - } - else - { - value="disabled"; - } - } - - document.getElementById("start_hr").disabled=value ; - document.getElementById("start_min").disabled=value ; - document.getElementById("duration_hr").disabled=value ; - document.getElementById("duration_min").disabled=value ; - document.getElementById("description").disabled=value; - document.getElementById("start_day").disabled=value; - <?php if($course->format=="topics" || $course->format == "social" || $course->format=="site" ){?> - document.getElementById("start_month").disabled=value; - document.getElementById("start_year").disabled=value; - <?}?> + if(value=="check") + { + if(document.getElementById("calendar_event").checked==true) + { + value=""; + } + else + { + value="disabled"; + } + } + + document.getElementById("start_hr").disabled=value ; + document.getElementById("start_min").disabled=value ; + document.getElementById("duration_hr").disabled=value ; + document.getElementById("duration_min").disabled=value ; + document.getElementById("description").disabled=value; + document.getElementById("start_day").disabled=value; + <?php if($course->format=="topics" || $course->format == "social" || $course->format=="site" ){?> + document.getElementById("start_month").disabled=value; + document.getElementById("start_year").disabled=value; + <?}?> } function change(){ - if(document.getElementById("section").value == 0) - { - hideCalendarEvent("disabled"); - document.getElementById("calendar_event").disabled="disabled"; - document.getElementById("comment_date").innerHTML=""; - } - else - { - document.getElementById("calendar_event").disabled=""; - if(document.getElementById("calendar_event").checked==false) - { - hideCalendarEvent("disabled"); - } - else - { + if(document.getElementById("section").value == 0) + { + hideCalendarEvent("disabled"); + document.getElementById("calendar_event").disabled="disabled"; + document.getElementById("comment_date").innerHTML=""; + } + else + { + document.getElementById("calendar_event").disabled=""; + if(document.getElementById("calendar_event").checked==false) + { + hideCalendarEvent("disabled"); + } + else + { hideCalendarEvent(""); - } - - var value = parseInt("<?php echo $course->startdate ?>") + - parseInt((document.getElementById("section").value -1) * 604800) + - parseInt(document.getElementById("start_day").value) + 3600; //add 3600 for ie - - var date = new Date(value*1000); - document.getElementById("calendar_start").value= value; - document.getElementById("comment_date").innerHTML= (date.getMonth()+1)+"/"+ date.getDate()+"/"+date.getFullYear(); - - } + } + + var value = parseInt("<?php echo $course->startdate ?>") + + parseInt((document.getElementById("section").value -1) * 604800) + + parseInt(document.getElementById("start_day").value) + 3600; //add 3600 for ie + + var date = new Date(value*1000); + document.getElementById("calendar_start").value= value; + document.getElementById("comment_date").innerHTML= (date.getMonth()+1)+"/"+ date.getDate()+"/"+date.getFullYear(); + + } } function FillForm(){ - - if(document.getElementById("name")!=null && readCookie("name")!=null) - { - document.getElementById("name").value=[readCookie("name")]; - deleteCookie("name"); - } - - if(document.getElementById("section")!=null && readCookie("section")!=null) - { - document.getElementById("section")[readCookie("section")].selected=true; - deleteCookie("section"); - } - - if(document.getElementById("menuvisible")!=null && readCookie("menuvisible")!=null) - { - document.getElementById("menuvisible")[readCookie("menuvisible")].selected=true; - deleteCookie("menuvisible"); - } - - if(document.getElementById("calendar_event")!=null && readCookie("calendar_event")!=null) - { - document.getElementById("calendar_event").checked=booleanValue(readCookie("calendar_event")); - document.getElementById("calendar_event").disabled=booleanValue(readCookie("calendar_event_disabled")); - deleteCookie("calendar_event"); - deleteCookie("calendar_event_disabled"); - } - - if(document.getElementById("start_month")!=null && readCookie("start_month")!=null) - { - document.getElementById("start_month")[readCookie("start_month")].selected=true; - document.getElementById("start_month").disabled=booleanValue(readCookie("start_month_disabled")); - deleteCookie("start_month"); - deleteCookie("start_month_disabled"); - } - - if(document.getElementById("start_day")!=null && readCookie("start_day")!=null) - { - document.getElementById("start_day")[readCookie("start_day")].selected=true; - document.getElementById("start_day").disabled=booleanValue(readCookie("start_day_disabled")); - deleteCookie("start_day"); - deleteCookie("start_day_disabled"); - } - - if(document.getElementById("start_year")!=null && readCookie("start_year")!=null) - { - document.getElementById("start_year")[readCookie("start_year")].selected=true; - document.getElementById("start_year").disabled=booleanValue(readCookie("start_year_disabled")); - deleteCookie("start_year"); - deleteCookie("start_year_disabled"); - } - - if(document.getElementById("start_hr")!=null && readCookie("start_hr")!=null) - { - document.getElementById("start_hr")[readCookie("start_hr")].selected=true; - document.getElementById("start_hr").disabled=booleanValue(readCookie("start_hr_disabled")); - deleteCookie("start_hr"); - deleteCookie("start_hr_disabled"); - } - - if(document.getElementById("duration_hr")!=null && readCookie("duration_hr")!=null) - { - document.getElementById("duration_hr")[readCookie("duration_hr")].selected=true; - document.getElementById("duration_hr").disabled=booleanValue(readCookie("duration_hr_disabled")); - deleteCookie("duration_hr"); - deleteCookie("duration_hr_disabled"); - } - - if(document.getElementById("duration_min")!=null && readCookie("duration_min")!=null) - { - document.getElementById("duration_min")[readCookie("duration_min")].selected=true; - document.getElementById("duration_min").disabled=booleanValue(readCookie("duration_min_disabled")); - deleteCookie("duration_min"); - deleteCookie("duration_min_disabled"); - } - - if(document.getElementById("start_min")!=null && readCookie("start_min")!=null) - { - document.getElementById("start_min")[readCookie("start_min")].selected=true; - document.getElementById("start_min").disabled=booleanValue(readCookie("start_min_disabled")); - deleteCookie("start_min"); - deleteCookie("start_min_disabled"); - } - - if(document.getElementById("description")!=null && readCookie("description")!=null) - { - document.getElementById("description").value=readCookie("description"); - document.getElementById("description").disabled=booleanValue(readCookie("description_disabled")); - deleteCookie("description"); - deleteCookie("description_disabled"); - } + + if(document.getElementById("name")!=null && readCookie("name")!=null) + { + document.getElementById("name").value=[readCookie("name")]; + deleteCookie("name"); + } + + if(document.getElementById("section")!=null && readCookie("section")!=null) + { + document.getElementById("section")[readCookie("section")].selected=true; + deleteCookie("section"); + } + + if(document.getElementById("menuvisible")!=null && readCookie("menuvisible")!=null) + { + document.getElementById("menuvisible")[readCookie("menuvisible")].selected=true; + deleteCookie("menuvisible"); + } + + if(document.getElementById("calendar_event")!=null && readCookie("calendar_event")!=null) + { + document.getElementById("calendar_event").checked=booleanValue(readCookie("calendar_event")); + document.getElementById("calendar_event").disabled=booleanValue(readCookie("calendar_event_disabled")); + deleteCookie("calendar_event"); + deleteCookie("calendar_event_disabled"); + } + + if(document.getElementById("start_month")!=null && readCookie("start_month")!=null) + { + document.getElementById("start_month")[readCookie("start_month")].selected=true; + document.getElementById("start_month").disabled=booleanValue(readCookie("start_month_disabled")); + deleteCookie("start_month"); + deleteCookie("start_month_disabled"); + } + + if(document.getElementById("start_day")!=null && readCookie("start_day")!=null) + { + document.getElementById("start_day")[readCookie("start_day")].selected=true; + document.getElementById("start_day").disabled=booleanValue(readCookie("start_day_disabled")); + deleteCookie("start_day"); + deleteCookie("start_day_disabled"); + } + + if(document.getElementById("start_year")!=null && readCookie("start_year")!=null) + { + document.getElementById("start_year")[readCookie("start_year")].selected=true; + document.getElementById("start_year").disabled=booleanValue(readCookie("start_year_disabled")); + deleteCookie("start_year"); + deleteCookie("start_year_disabled"); + } + + if(document.getElementById("start_hr")!=null && readCookie("start_hr")!=null) + { + document.getElementById("start_hr")[readCookie("start_hr")].selected=true; + document.getElementById("start_hr").disabled=booleanValue(readCookie("start_hr_disabled")); + deleteCookie("start_hr"); + deleteCookie("start_hr_disabled"); + } + + if(document.getElementById("duration_hr")!=null && readCookie("duration_hr")!=null) + { + document.getElementById("duration_hr")[readCookie("duration_hr")].selected=true; + document.getElementById("duration_hr").disabled=booleanValue(readCookie("duration_hr_disabled")); + deleteCookie("duration_hr"); + deleteCookie("duration_hr_disabled"); + } + + if(document.getElementById("duration_min")!=null && readCookie("duration_min")!=null) + { + document.getElementById("duration_min")[readCookie("duration_min")].selected=true; + document.getElementById("duration_min").disabled=booleanValue(readCookie("duration_min_disabled")); + deleteCookie("duration_min"); + deleteCookie("duration_min_disabled"); + } + + if(document.getElementById("start_min")!=null && readCookie("start_min")!=null) + { + document.getElementById("start_min")[readCookie("start_min")].selected=true; + document.getElementById("start_min").disabled=booleanValue(readCookie("start_min_disabled")); + deleteCookie("start_min"); + deleteCookie("start_min_disabled"); + } + + if(document.getElementById("description")!=null && readCookie("description")!=null) + { + document.getElementById("description").value=readCookie("description"); + document.getElementById("description").disabled=booleanValue(readCookie("description_disabled")); + deleteCookie("description"); + deleteCookie("description_disabled"); + } if(document.getElementById("comment_date")!=null && readCookie("comment_date")!=null) { document.getElementById("comment_date").innerHTML=readCookie("comment_date"); @@ -549,362 +541,359 @@ } function loadPage(){ - TestNoTool(); - FillForm(); + TestNoTool(); + FillForm(); } window.onload=loadPage; </script> -<title>Wimba</title> -</head> -<body> - <div class="content" id=content width=700px align=center> - <form name="form" id="form" method="post" action="mod.php"> - <input type="hidden" value="" name="type"> +<div class="content" id=content width=700px align=center> + <form name="form" id="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> + <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/voicetools/lib/web/pictures/items/headerbar-logo.png"> + </td> + <td align="right" class="headerBarRight"> + </td> + </tr> + </table> + </div> + <div id="contextBar" width=700px align=center style="border-bottom: solid 1px #D9DEE5;"> + <table width=700px align=center> + <tbody> <tr> - <td class="headerBarLeft" align="left"> - <img alt="" src="<?php echo $CFG->wwwroot;?>/mod/voicetools/lib/web/pictures/items/headerbar-logo.png"> - </td> - <td align="right" class="headerBarRight"> + <td class="contextBarLeft" align="left"> + <label class= "nameElement"><?php print_string('addactivity', 'voicetools') ?></label> + <label class="nameTools">: Voice Tools in <?php echo $course->fullname; ?></label> </td> + <td class="contextBarRight" align="right">Voice Tools</td> </tr> - </table> - </div> - <div id="contextBar" width=700px align=center style="border-bottom: solid 1px #D9DEE5;"> - <table width=700px align=center> - <tbody> - <tr> - <td class="contextBarLeft" align="left"> - <label class= "nameElement"><?php print_string('addactivity', 'voicetools') ?></label> - <label class="nameTools">: Voice Tools in <?php echo $course->fullname; ?></label> - </td> - <td class="contextBarRight" align="right">Voice Tools</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', 'voicetools') ?></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', 'voicetools')?></font> - </td> - </tr> - <?php if($course->format == "weeks" || $course->format == "weekscss"){ ?> - <tr valign="top"> - <td align="right"> - <font class="fontCurrent"><?php print_string('weeksformat', 'voicetools')?></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', 'voicetools') ?></font> - </td> - <td colspan="2" align="left"> - <select name="section" id="section"> - <?php echo getListOfTopics($course,$sectionId); ?> - </select> - </td> - </tr> - <?php } ?> - <tr valign="top"> - <td align="right"> - <font color="red">*</font><?php print_string('voicetoolstype', 'voicetools')?> - </td> - - <td align="left"><select id="resource" name="resource"> - <option value="empty"> - Select... - </option> - <optgroup label="<?php echo get_string ('voiceboard', 'voicetools') ?>"> - <?php - for($i=0;$vtResources!=null && $i<count($vtResources->getResources()) ;$i++) { - $resource = $vtResources->getResource($i); - if($resource->getType()=="board"){ - if (isset($resource_id) && $resource_id == $resource->getRid()) - { - echo "<option value=".$resource->getRid().";".$resource->getType()." selected >".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; - } - else - { - echo "<option value=".$resource->getRid().";".$resource->getType().">".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; - } - } + </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', 'voicetools') ?></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', 'voicetools')?></font> + </td> + </tr> + <?php if($course->format == "weeks" || $course->format == "weekscss"){ ?> + <tr valign="top"> + <td align="right"> + <font class="fontCurrent"><?php print_string('weeksformat', 'voicetools')?></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', 'voicetools') ?></font> + </td> + <td colspan="2" align="left"> + <select name="section" id="Select1"> + <?php echo getListOfTopics($course,$sectionId); ?> + </select> + </td> + </tr> + <?php } ?> + <tr valign="top"> + <td align="right"> + <font color="red">*</font><?php print_string('voicetoolstype', 'voicetools')?> + </td> + + <td align="left"><select id="resource" name="resource"> + <option value="empty"> + Select... + </option> + <optgroup label="<?php echo get_string ('voiceboard', 'voicetools') ?>"> + <?php + for($i=0;$vtResources!=null && $i<count($vtResources->getResources()) ;$i++) + { + $resource = $vtResources->getResource($i); + if($resource->getType()=="board") + { + if (isset($resource_id) && $resource_id == $resource->getRid()) + { + echo "<option value=".$resource->getRid().";".$resource->getType()." selected >".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; + } + else + { + echo "<option value=".$resource->getRid().";".$resource->getType().">".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; + } + } - } - ?> - </optgroup> - <optgroup label="<?php echo get_string ('voicepresentation', 'voicetools') ?>"> - <?php - for($i=0;$vtResources!=null && $i<count($vtResources->getResources());$i++) { - $resource = $vtResources->getResource($i); - if($resource->getType()=="presentation"){ + } + ?> + </optgroup> + <optgroup label="<?php echo get_string ('voicepresentation', 'voicetools') ?>"> + <?php + for($i=0;$vtResources!=null && $i<count($vtResources->getResources());$i++) { + $resource = $vtResources->getResource($i); + if($resource->getType()=="presentation"){ - if (isset($resource_id) && $resource_id == $resource->getRid()) - { - echo "<option value=".$resource->getRid().";".$resource->getType()." selected >".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; - } - else - { - echo "<option value=".$resource->getRid().";".$resource->getType().">".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; - } - } + if (isset($resource_id) && $resource_id == $resource->getRid()) + { + echo "<option value=".$resource->getRid().";".$resource->getType()." selected >".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; + } + else + { + echo "<option value=".$resource->getRid().";".$resource->getType().">".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; + } + } - } - ?> - </optgroup> + } + ?> + </optgroup> - <optgroup label="<?php echo get_string ('podcaster', 'voicetools') ?>"> - <?php - for($i=0;$vtResources!=null && $i<count($vtResources->getResources());$i++) { - $resource = $vtResources->getResource($i); - if($resource->getType()=="pc"){ + <optgroup label="<?php echo get_string ('podcaster', 'voicetools') ?>"> + <?php + for($i=0;$vtResources!=null && $i<count($vtResources->getResources());$i++) { + $resource = $vtResources->getResource($i); + if($resource->getType()=="pc") + { + if (isset($resource_id) && $resource_id == $resource->getRid()) + { + echo "<option value=".$resource->getRid().";".$resource->getType()." selected >".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; + } + else + { + echo "<option value=".$resource->getRid().";".$resource->getType().">".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; + } + } - if (isset($resource_id) && $resource_id == $resource->getRid()) - { - echo "<option value=".$resource->getRid().";".$resource->getType()." selected >".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; - } - else - { - echo "<option value=".$resource->getRid().";".$resource->getType().">".((strlen($resource->getTitle())>25)?substr($resource->getTitle(),0,25)."...":$resource->getTitle())."</option>" ; + } + ?> + </optgroup> + </select> + </td> + + <td width="50px"><?php print_string('or', 'voicetools')?></td> + <td> + <input type="button" value="<?php print_string('new', 'voicetools')?>" onclick="javascript:LaunchCreateWorkflow()"> + </td> + </tr> + <tr valign="top" > + <td align="right"> + <font class="fontCurrent"><?php echo get_string('visibletostudents','voicetools'); ?></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=right> + <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', 'voicetools') ?></font> + </td> + </tr> + + <tr> + <?php + if($course->format == "weeks" || $course->format == "weekscss"){?> + <td align=right style="width:180px"> + <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),"voicetools")."</option>"; + else + echo "<option value=".($i*86400).">".get_string("day".date('w',(($i*86400)+$course->startdate)),"voicetools")."</option>"; + } + ?> + </select> + <label id="comment_date"><?php echo $stringDate;?></label> + </td> + <? + }else if($course->format == "topics" || $course->format == "social" || $course->format == "site"){?> + <td align=right style="width:240px"> + <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,"voicetools")."</option>"; + else + echo "<option value=".$i.">".get_string("month".$i,"voicetools")."</option>"; + } + ?> + </select> + <select id="Select2" 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> + <td align=left > + <select id="start_hr" name="start_hr" <?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 ?>> + <?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>"; } - } + ?> + </select> + </td> + </tr> + <tr> + <td align="right"> + <font class="fontCurrent"><?echo get_string('duration_calendar','voicetools')?></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> + hr + <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> + min + </td> + </tr> + <tr> + <td align="right"> + <font class="fontCurrent"><? echo get_string('description_calendar', 'voicetools')?></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 align=center width=700px> + <table width=700px cellpadding="5" align=center > + <tr style="border-top:1px solid; background-color:#F0F0F0;"> + <td align="left"><img alt="" src="<?php echo $CFG->wwwroot;?>/mod/voicetools/lib/web/pictures/items/listitem-voicetoolsicon.gif" ><a class="list" href="<?php echo $CFG->wwwroot;?>/mod/voicetools/index.php?id=<?php echo $course_id;?>"> + <?php print_string('activity_manageTools', 'voicetools')?></a> + </td> - } - ?> - </optgroup> - </select> - </td> + <td align="right" class="action" onclick="self.location.href='<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php p($course_id)?>'"> + <label><?php print_string('validationElement_cancel', 'voicetools')?></label> + </td> + <?php + if($update!=false) + $text=get_string('validationElement_saveAll', 'voicetools'); + else + $text=get_string('validationElement_create', 'voicetools'); + ?> + + <td id="setting_Create" class="action" align="right" onclick="validate();"> + <label><?php echo $text;?></label> + </td> - <td width="50px"><?php print_string('or', 'voicetools')?></td> - <td> - <input type="button" value="<?php print_string('new', 'voicetools')?>" onclick="javascript:LaunchCreateWorkflow()"> - </td> - </tr> - <tr valign="top" > - <td align="right"> - <font class="fontCurrent"><?php echo get_string('visibletostudents','voicetools'); ?></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=right> - <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', 'voicetools') ?></font> - </td> - </tr> - - <tr> - <?php - if($course->format == "weeks" || $course->format == "weekscss"){?> - <td align=right style="width:180px"> - <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),"voicetools")."</option>"; - else - echo "<option value=".($i*86400).">".get_string("day".date('w',(($i*86400)+$course->startdate)),"voicetools")."</option>"; - } - ?> - </select> - <label id="comment_date"><?php echo $stringDate;?></label> - </td> - <? - }else if($course->format == "topics" || $course->format == "social" || $course->format == "site"){?> - <td align=right style="width:240px"> - <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,"voicetools")."</option>"; - else - echo "<option value=".$i.">".get_string("month".$i,"voicetools")."</option>"; - } - ?> - </select> - <select id="start_day" name="start_day" <?php echo $disableAllElements ?>> - <?php - ... [truncated message content] |
From: <tro...@us...> - 2008-02-15 19:09:15
|
Revision: 245 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=245&view=rev Author: trollinger Date: 2008-02-15 11:09:14 -0800 (Fri, 15 Feb 2008) Log Message: ----------- fix a problem related to the update of an existing event Modified Paths: -------------- branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php branches/team/Thomas/moodle/mod/voicetools/lib.php branches/team/Thomas/moodle/mod/voicetools/mod.html Modified: branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php 2008-02-15 19:08:40 UTC (rev 244) +++ branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php 2008-02-15 19:09:14 UTC (rev 245) @@ -26,7 +26,7 @@ * * ******************************************************************************/ -/* $Id: voicetools.php 51391 2007-07-16 21:10:29Z thomasr $ */ +/* $Id: voicetools.php 56777 2007-12-03 21:38:57Z thomasr $ */ $string['modulename'] = 'Wimba Voice Tool'; $string['modulenameplural'] = 'Wimba Voice Tools'; @@ -64,6 +64,12 @@ $string["weeksformat"]="Week:"; $string["activity_tools_not_available"]="The Voice Tools linked to this activity is currently unavailable.<br>Please contact your instructor"; $string["activity_manageTools"]="Manage Voice Tools"; + +$string['addactivity'] = 'Add an Activity'; +$string['or'] = "or"; +$string['visibletostudents'] = "Visible to students:"; +$string['in'] = "in"; + //tab name $string['board_info'] = 'Info'; $string['media'] = 'Media'; @@ -104,7 +110,7 @@ $string['private_comment']='Student cannot view other student\'s discussion threads'; $string['comment_slide']= "Student can comment the slides"; $string['private_slide']= "Make slide comments private"; - $string['private_slide_comment']= "Students cannot view other student's comments"; +$string['private_slide_comment']= "Students cannot view other student's comments"; $string['view_other_thread']="Student can view other student\'s discussion threads" ; $string['post_delay']= "Podcast auto-published after : "; @@ -153,10 +159,10 @@ $string['presentation'] = 'Voice Presentation - '; $string['VoicePresentation'] = 'Voice Presentation'; $string['voicepresentations'] = 'Voice Presentations'; - $string['podcaster'] = 'Wimba Podcaster'; - $string['Podcaster'] = 'Wimba Podcaster'; - $string['podcasters'] = 'Podcasters'; - $string['pc'] = 'Podcaster - '; +$string['podcaster'] = 'Wimba Podcaster'; +$string['Podcaster'] = 'Wimba Podcaster'; +$string['podcasters'] = 'Podcasters'; +$string['pc'] = 'Podcaster - '; $string['settings']="Settings"; $string['archivesession'] = 'Archive Sessions'; $string['new']="New"; @@ -420,7 +426,6 @@ $string['tooltipVT_1_student'] = "Available to students"; $string['configuration_test_vt_failed_sentence_start1'] = "The test of your Voice Tools server configuration settings was unsuccessful."; $string['configuration_test_vt_successful_sentence'] = "The test of your Voice Tools server configuration settings was successful. - The configuration settings have been saved."; $string['configuration_test_vtfailedAccount'] = "Please check the account name and the password s and retry."; $string['configuration_test_vtfailedConnection'] = "Please check the Voice Tools Server Url parameters and retry."; Modified: branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php 2008-02-15 19:08:40 UTC (rev 244) +++ branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php 2008-02-15 19:09:14 UTC (rev 245) @@ -57,7 +57,7 @@ $string['loglevel'] = 'Set Log Level:'; $string['viewlogs'] = 'View Logs...'; -$string["launch_calendar"]="Launch the Voice "; +$string["launch_calendar"]="Launch the Wimba "; $string["voicetoolstype"]="Associated Voice Tool:"; $string["activity_name"]="Activity Name:"; $string["topicformat"]="Topic:"; Modified: branches/team/Thomas/moodle/mod/voicetools/lib.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lib.php 2008-02-15 19:08:40 UTC (rev 244) +++ branches/team/Thomas/moodle/mod/voicetools/lib.php 2008-02-15 19:09:14 UTC (rev 245) @@ -131,7 +131,7 @@ if(isset($voicetool->calendar_event) && $voicetool->calendar_event==true) { - voicetools_addCalendarEvent($voicetool); + voicetools_addCalendarEvent($voicetool,$voicetool->id); } wimba_add_log(WIMBA_INFO,WV,"Add Instance".$voicetool->id); @@ -193,7 +193,7 @@ if(isset($voicetool->calendar_event) && $voicetool->calendar_event==true) {//no problem - voicetools_addCalendarEvent($voicetool,$voicetool->id ); + voicetools_addCalendarEvent($voicetool,$voicetool->instance); } else { @@ -228,20 +228,21 @@ } -function voicetools_addCalendarEvent($activity_informations){ - global $CFG; +function voicetools_addCalendarEvent($activity_informations,$instanceNumber){ + global $CFG; + //get some complementary of the resource $resource=get_record('voicetools_resources','rid',$activity_informations->rid); $event = new Object(); $event->name = $activity_informations->name; - $event->description = $activity_informations->description."<br><a href=".$CFG->wwwroot."/mod/voicetools/view.php?id=".$activity_informations->id."&action=launchCalendar target=_self >".get_string("launch_calendar","voicetools").$resource->type." ...</a>"; + $event->description = $activity_informations->description."<br><a href=".$CFG->wwwroot."/mod/voicetools/view.php?id=".$activity_informations->id."&action=launchCalendar target=_self >".get_string("launch_calendar","voicetools").get_string($resource->type,"voicetools")." ...</a>"; $event->format = 1; $event->userid = 0; $event->courseid = $activity_informations->course; //course event $event->groupid = 0; $event->modulename = 'voicetools'; - $event->instance = $activity_informations->id; + $event->instance = $instanceNumber; $event->eventtype = ''; $event->visible = 1; $event->timemodified = time(); Modified: branches/team/Thomas/moodle/mod/voicetools/mod.html =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/mod.html 2008-02-15 19:08:40 UTC (rev 244) +++ branches/team/Thomas/moodle/mod/voicetools/mod.html 2008-02-15 19:09:14 UTC (rev 245) @@ -95,15 +95,11 @@ $event=voicetools_get_event_calendar($activity->id); if($event==true) { + $disableAllElements=""; $checked ="checked"; list($description,$link)=split("<br>",$event->description); $stringDate=date('m',$event->timestart)."/".date('d',$event->timestart)."/".date('Y',$event->timestart); } - else - { - $disableAllElements="disabled"; - } - $completeName=explode(" - ", $activity->name); $name=$completeName[1]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-02-15 19:08:44
|
Revision: 244 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=244&view=rev Author: trollinger Date: 2008-02-15 11:08:40 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Add a new settings for the vb Modified Paths: -------------- branches/team/Thomas/integrations_common/php/common/WimbaUI.php branches/team/Thomas/integrations_common/php/vt/VtAction.php Modified: branches/team/Thomas/integrations_common/php/common/WimbaUI.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-02-14 23:22:21 UTC (rev 243) +++ branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-02-15 19:08:40 UTC (rev 244) @@ -1950,6 +1950,22 @@ $this->xml->createLine(); + $parameters = array ( + "type" => "checkbox", + "value" => "true", + "id" => "show_reply", + "name" => "show_reply" + ); + if (isset ($this->currentObject) && $this->currentObjectOptions->getShowReply() == 'true') + { + $parameters['checked'] = "true"; + } + $this->xml->addInputElement($parameters); + $this->xml->addSimpleLineElement("label", get_string('settings_show_reply', 'voicetools')); + $this->xml->createLinePart(); + + $this->xml->createLine(); + $this->xml->createPanelSettings( get_string('tab_title_features', 'voicetools'), "none", Modified: branches/team/Thomas/integrations_common/php/vt/VtAction.php =================================================================== --- branches/team/Thomas/integrations_common/php/vt/VtAction.php 2008-02-14 23:22:21 UTC (rev 243) +++ branches/team/Thomas/integrations_common/php/vt/VtAction.php 2008-02-15 19:08:40 UTC (rev 244) @@ -54,6 +54,8 @@ $options->setChronoOrder($this->params["chrono_order"]); //forward message $options->setShowForward($this->params["show_forward"]); + + $options->setShowReply($this->params["show_reply"]); $options->setAudioFormat($audio); $ressource->setOptions($options); //create the resource on the vt server @@ -104,6 +106,9 @@ $options->setChronoOrder($this->params["chrono_order"]); //forward message $options->setShowForward($this->params["show_forward"]); + + $options->setShowReply($this->params["show_reply"]); + $options->setAudioFormat($audio); $ressource->setOptions($options); //update This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2008-02-14 23:22:22
|
Revision: 243 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=243&view=rev Author: trollinger Date: 2008-02-14 15:22:21 -0800 (Thu, 14 Feb 2008) Log Message: ----------- -add more log -fix minor issue -Refactoring Modified Paths: -------------- branches/team/Thomas/moodle/mod/voicetools/config.html branches/team/Thomas/moodle/mod/voicetools/css/StyleSheet.css branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php branches/team/Thomas/moodle/mod/voicetools/getXmlNewPanel.php branches/team/Thomas/moodle/mod/voicetools/index.php branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php branches/team/Thomas/moodle/mod/voicetools/lang/fr/voicetools.php branches/team/Thomas/moodle/mod/voicetools/lang/fr_utf8/voicetools.php branches/team/Thomas/moodle/mod/voicetools/lib.php branches/team/Thomas/moodle/mod/voicetools/manageAction.php branches/team/Thomas/moodle/mod/voicetools/mod.html branches/team/Thomas/moodle/mod/voicetools/view.php branches/team/Thomas/moodle/mod/voicetools/voicerecorder.php branches/team/Thomas/moodle/mod/voicetools/welcome.php Modified: branches/team/Thomas/moodle/mod/voicetools/config.html =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/config.html 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/config.html 2008-02-14 23:22:21 UTC (rev 243) @@ -1,35 +1,47 @@ <?php if(isset($CFG->voicetools_servername)) -$servername=$CFG->voicetools_servername; +{ + $servername=$CFG->voicetools_servername; +} else -$servername=""; +{ + $servername=""; +} if(isset($CFG->voicetools_adminusername)) -$adminusername=$CFG->voicetools_adminusername; +{ + $adminusername=$CFG->voicetools_adminusername; +} else -$adminusername=""; +{ + $adminusername=""; +} if(isset($CFG->voicetools_adminpassword)) -$adminpassword=$CFG->voicetools_adminpassword; +{ + $adminpassword=$CFG->voicetools_adminpassword; +} else -$adminpassword=""; +{ + $adminpassword=""; +} ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> - <title>Voice Tools Server Configuration </title> - + <title>Voice Tools 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; @@ -44,6 +56,7 @@ vertical-align: middle; } </style> + <body> <form method="post" action="module.php" name="form"> <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>"> @@ -52,7 +65,7 @@ <table cellpadding="9" cellspacing="0" width=800px> <tr> <td width="2%"> - <img src="<?php echo $CFG->wwwroot;?>/mod/voicetools/pictures/items/voice_tools.png" border="0" /> + <img src="<?php echo $CFG->wwwroot;?>/mod/voicetools/lib/web/pictures/items/voice_tools.png" border="0" /> </td> <td align="left" class="page_title"> <?php print_string('serverconfiguration', 'voicetools')?> @@ -115,9 +128,25 @@ <?php p(VOICETOOLS_MODULE_VERSION) ?> </td> </tr> + <tr> + <td align="right"> + <label class="label_settings"><?php echo get_string("loglevel", "voicetools");?></label> + </td> + <td align="left"> + <select size="1" name="log_level"> + <option value=1 <?php if (@$CFG->voicetools_log_level == 1) echo "selected"; ?>>DEBUG</option> + <option value=2 <?php if (!isset($CFG->voicetools_log_level) || @$CFG->voicetools_log_level == 2) echo "selected"; ?>>INFO</option> + <option value=3 <?php if (@$CFG->voicetools_log_level == 3) echo "selected"; ?>>WARN</option> + <option value=4 <?php if (@$CFG->voicetools_log_level == 4) echo "selected"; ?>>ERROR</option> + </select> + <a href=<?php echo $CFG->wwwroot."/mod/voicetools/log.php?action=list"; ?> onclick="document.forms['logs_form'].submit();"><?php echo get_string("viewlogs", "voicetools");?></a> + </form> + </td> + </tr> </table> </td> </tr> + <tr> <td colspan="3" align="center"> <input type="submit" value="<?php print_string('savechanges') ?>" /> Modified: branches/team/Thomas/moodle/mod/voicetools/css/StyleSheet.css =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/css/StyleSheet.css 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/css/StyleSheet.css 2008-02-14 23:22:21 UTC (rev 243) @@ -577,9 +577,9 @@ /*MessageBar*/ -#messageBar +#message { - width:700px; + width:699px; } .message @@ -696,7 +696,7 @@ font-size: 12px; } -div.advancedPopup { +div.advancedPopup,div.informationPopup { position:absolute; left:0px; top:0px; @@ -706,9 +706,18 @@ font-family:Verdana; padding: 2px; margin: 2px; + + display:none; +} + +div.advancedPopup { left: 15%; + top: 20%; +} + +div.informationPopup { + left: 40%; top: 30%; - display:none; } div.window-left { @@ -737,7 +746,7 @@ top:0px; width:10px; height:150px; - background-image: url( "../pictures/items/window-right.png" ); + background-image: url( "../lib/web/pictures/items/window-right.png" ); background-repeat:none; } Modified: branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/getXmlChoicePage.php 2008-02-14 23:22:21 UTC (rev 243) @@ -28,95 +28,112 @@ ******************************************************************************/ /* $Id: getXmlChoicePage.php 52853 2007-08-24 17:55:26Z thomasr $ */ - global $CFG; - require_once("../../config.php"); - require_once("lib.php"); - require_once("lib/php/common/WimbaXml.php"); - require_once("lib/php/common/WimbaCommons.php"); - require_once("lib/php/common/WimbaLib.php"); - if (version_compare(PHP_VERSION,'5','>=')) { - require_once('lib/php/common/domxml-php4-php5.php'); - } +global $CFG; +require_once("../../config.php"); +require_once("lib.php"); +require_once("lib/php/common/WimbaXml.php"); +require_once("lib/php/common/WimbaCommons.php"); +require_once("lib/php/common/WimbaLib.php"); +if (version_compare(PHP_VERSION,'5','>=')) { + require_once('lib/php/common/domxml-php4-php5.php'); +} + +set_error_handler("manage_error"); + +foreach(getKeysOfGeneralParameters() as $param){ + $value=optional_param($param["value"],$param["default_value"],$param["type"]); + if($value!=null) + { + $params[$param["value"]] = $value; + } +} + +wimba_add_log(WIMBA_DEBUG,WV,"getXmlListPanel : parameters \n" . print_r($params,true)); + +require_login($params["enc_course_id"]); + +$createWorkflow = optional_param('createWorkflow', false, PARAM_BOOL); // course +$xml=new WimbaXml(); +$session=new WimbaMoodleSession($params); + +if($session->error==false)//no error +{ + /******** + HEADER + *********/ + $xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "true", "true"); + /******** + SESSION + *********/ + $xml->CreateInformationElement($session->timeOfLoad, + $session->hparams["firstname"], + $session->hparams["lastname"], + $session->hparams["email"], + $session->hparams["role"], + $session->hparams["course_id"], + $session->signature,""); + /************ + INFORMATIONS + *************/ + $xml->addContextBarElement(get_string('new_tool','voicetools')); + /*************** + PRODUCTS CHOICE + ****************/ + $xml->addProductChoice("lib/web/pictures/buttons/new-createvoiceboard.png", + get_string('new_board', 'voicetools'), + get_string('VoiceBoardDescription', 'voicetools'), + "javascript:loadNewSettings('getXmlNewPanel.php','create' ,'voicetools','board','all','".$createWorkflow."')"); - foreach(getKeysOfGeneralParameters() as $param){ - $value=optional_param($param["value"],$param["default_value"],$param["type"]); - if($value!=null) - { - $params[$param["value"]] = $value; - } - } + + $xml->addProductChoice("lib/web/pictures/buttons/new-createvoicepresentation.png", + get_string('new_presentation', 'voicetools'), + get_string('VoicePresentationDescription', 'voicetools'), + "javascript:loadNewSettings('getXmlNewPanel.php','create' ,'voicetools','presentation','all','".$createWorkflow."')"); - require_login($params["enc_course_id"]); - $createWorkflow = optional_param('createWorkflow', false, PARAM_BOOL); // course - $xml=new WimbaXml(); - $session=new WimbaMoodleSession($params); + $xml->addProductChoice("lib/web/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 - if($session->error==false)//no error - { - /******** - HEADER - *********/ - $xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "true", "true"); - /******** - SESSION - *********/ - $xml->CreateInformationElement($session->timeOfLoad, - $session->hparams["firstname"], - $session->hparams["lastname"], - $session->hparams["email"], - $session->hparams["role"], - $session->hparams["course_id"], - $session->signature,""); - /************ - INFORMATIONS - *************/ - $xml->addContextBarElement(get_string('new_tool','voicetools')); - - /*************** - PRODUCTS CHOICE - ****************/ - $xml->addProductChoice("lib/web/pictures/buttons/new-createvoiceboard.png", - get_string('new_board', 'voicetools'), - get_string('VoiceBoardDescription', 'voicetools'), - "javascript:loadNewSettings('getXmlNewPanel.php','create' ,'voicetools','board','all','".$createWorkflow."')"); - + /*************** + VALIDATION BAR + ****************/ + $actionParameters = array("value"=>get_string('cancel', 'voicetools'), + "style"=>"action", + "action"=>"launchAjaxRequest"); - $xml->addProductChoice("lib/web/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("lib/web/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"); - - 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 - $xml->setError(get_string ($session->error, 'voicetools')); + 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 + wimba_add_log(WIMBA_ERROR,WV,"getChoicePanel : ". get_string ($session->error, 'voicetools')); + $xml->setError(get_string ($session->error, 'voicetools')); +} + +wimba_add_log(WIMBA_DEBUG,WV,"getChoicePanel : xml generated \n". $xml->getXml()); + +if(isset($error_wimba))//error fatal was detected +{ + $uiManager->setError(get_string ('error_display', 'voicetools')); +} +else +{ echo $xml->getXml(); +} + ?> \ No newline at end of file Modified: branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/getXmlListPanel.php 2008-02-14 23:22:21 UTC (rev 243) @@ -46,6 +46,8 @@ require_once('lib/php/common/domxml-php4-php5.php'); } +set_error_handler("manage_error"); + $messageProduct=optional_param("messageProduct",""); $messageAction=optional_param("messageAction",""); @@ -58,24 +60,41 @@ require_login($params["enc_course_id"]); $uiManager=new WimbaUI($params); -if(isset($params["error"]) ) +wimba_add_log(WIMBA_DEBUG,WV,"getXmlListPanel : parameters \n" . print_r($params,true)); + +if(isset($params["error"])) { + wimba_add_log(WIMBA_ERROR,WV,"getXmlListPanel : ". get_string ($params["error"], 'voicetools')); $uiManager->setError(get_string ($params["error"], 'voicetools')); } else { //Session Management - if($uiManager->getSessionError()==false)//good - { - $message=""; - if(!empty($messageProduct) && !empty($messageAction)) - $message=get_string("message_".$messageProduct."_start", "voicetools")." ".get_string("message_".$messageAction."_end","voicetools"); - $uiManager->getVTPrincipalView($message); - } - else - { //bad session - $uiManager->setError(get_string ('error_'.$uiManager->getError(), 'voicetools')); - } + if($uiManager->getSessionError()==false)//good + { + $message=""; + if(!empty($messageProduct) && !empty($messageAction)) + { + $message=get_string("message_".$messageProduct."_start", "voicetools")." ". + get_string("message_".$messageAction."_end","voicetools"); + } + $uiManager->getVTPrincipalView($message); + } + else + { //bad session + wimba_add_log(WIMBA_ERROR,WV,"getXmlListPanel : ". get_string ('error_'.$uiManager->getError(), 'voicetools')); + $uiManager->setError(get_string ('error_'.$uiManager->getError(), 'voicetools')); + } } -echo $uiManager->getXmlString(); + +wimba_add_log(WIMBA_DEBUG,WV,"getXmlListPanel : xml generated \n". $uiManager->getXmlString()); + +if(isset($error_wimba))//error fatal was detected +{ + $uiManager->setError(get_string ('error_display', 'voicetools')); +} +else +{ + echo $uiManager->getXmlString(); +} ?> \ No newline at end of file Modified: branches/team/Thomas/moodle/mod/voicetools/getXmlNewPanel.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/getXmlNewPanel.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/getXmlNewPanel.php 2008-02-14 23:22:21 UTC (rev 243) @@ -31,73 +31,85 @@ /// This page is to generate the list of VT - global $CFG; - require_once("../../config.php"); - require_once("lib.php"); - require_once("lib/php/vt/WimbaVoicetoolsAPI.php"); - require_once("lib/php/vt/WimbaVoicetools.php"); - require_once("lib/php/common/WimbaCommons.php"); - require_once("lib/php/common/WimbaXml.php"); - require_once("lib/php/common/WimbaUI.php"); - require_once("lib/php/common/WimbaLib.php"); - if (version_compare(PHP_VERSION,'5','>=')) { - require_once('lib/php/common/domxml-php4-php5.php'); +global $CFG; +require_once("../../config.php"); +require_once("lib.php"); +require_once("lib/php/vt/WimbaVoicetoolsAPI.php"); +require_once("lib/php/vt/WimbaVoicetools.php"); +require_once("lib/php/common/WimbaCommons.php"); +require_once("lib/php/common/WimbaXml.php"); +require_once("lib/php/common/WimbaUI.php"); +require_once("lib/php/common/WimbaLib.php"); +if (version_compare(PHP_VERSION,'5','>=')) { + require_once('lib/php/common/domxml-php4-php5.php'); +} + +set_error_handler("manage_error"); + +$createWorkflow = optional_param('createWorkflow', false, PARAM_BOOL); // course +foreach(getKeysOfGeneralParameters() as $param) +{ + $value=optional_param($param["value"],$param["default_value"],$param["type"]); + if($value!=null) + { + $params[$param["value"]] = $value; } +} +wimba_add_log(WIMBA_DEBUG,WV,"getXmlListPanel : parameters \n" . print_r($params,true)); +require_login($params["enc_course_id"]); + +$uiManager=new WimbaUI($params); +if($uiManager->getSessionError()==false) +{ + /******************* + GET URL INFORMATIONS + ********************/ + $action = optional_param('action', ""); // Course Module ID, or + $typeProduct = $params['type']; - $createWorkflow = optional_param('createWorkflow', false, PARAM_BOOL); // course - foreach(getKeysOfGeneralParameters() as $param) - { - $value=optional_param($param["value"],$param["default_value"],$param["type"]); - if($value!=null) + if($action == 'update') + { //get the information of the resource + $currentBoard = voicetools_api_get_resource($params["resource_id"]); + + if($currentBoard==null || $currentBoard->error==true) { - $params[$param["value"]] = $value; + wimba_add_log(WIMBA_ERROR,WV,"getXmlNewPanel : ". get_string('problem_vt','voicetools')); + $uiManager->setError(get_string('problem_vt','voicetools')); } - } - require_login($params["enc_course_id"]); - $uiManager=new WimbaUI($params); - - if($uiManager->getSessionError()==false) - { - /******************* - GET URL INFORMATIONS - ********************/ - $action = optional_param('action', ""); // Course Module ID, or - $typeProduct = $params['type']; - add_to_log($uiManager->getSession()->getCourseId(), "voicetools", "xml", "product" , $typeProduct); - - if($action == 'update') - { //get the information of the resource - $currentBoard = voicetools_api_get_resource($params["resource_id"]); - - if($currentBoard==null || $currentBoard->error==true) - { - $uiManager->setError(get_string('problem_vt','voicetools')); - } - - $currentBoardInformations=voicetools_get_voiceboard_Informations($params["resource_id"]); - // print_r($currentBoardInformations); - if($currentBoard->error==true) - { - $uiManager->setError(get_string('problem_bd','voicetools')); - } - - $uiManager->setCurrentProduct($typeProduct,$currentBoard,$currentBoardInformations); - - } - else + $currentBoardInformations=voicetools_get_voiceboard_Informations($params["resource_id"]); + // print_r($currentBoardInformations); + if($currentBoard->error==true) { - $uiManager->setCurrentProduct($typeProduct); + wimba_add_log(WIMBA_ERROR,WV,"getXmlNewPanel : ". get_string('problem_bd','voicetools')); + $uiManager->setError(get_string('problem_bd','voicetools')); } - $display= $uiManager->getVTSettingsView($action,$createWorkflow); + $uiManager->setCurrentProduct($typeProduct,$currentBoard,$currentBoardInformations); } else { - $uiManager->setError(get_string ($uiManager->getSessionError(), 'voicetools')); + $uiManager->setCurrentProduct($typeProduct); } + $display= $uiManager->getVTSettingsView($action,$createWorkflow); + +} +else +{ + wimba_add_log(WIMBA_ERROR,WV,"getXmlNewPanel : ". get_string ('error_'.$uiManager->getError(), 'voicetools')); + $uiManager->setError(get_string ('error_'.$uiManager->getSessionError(), 'voicetools')); +} +wimba_add_log(WIMBA_DEBUG,WV,"getXmlListPanel : parameters \n" . $uiManager->getXmlString()); + +if(isset($error_wimba))//error fatal was detected +{ + $uiManager->setError(get_string ('error_display', 'voicetools')); +} +else +{ echo $uiManager->getXmlString(); +} ?> Modified: branches/team/Thomas/moodle/mod/voicetools/index.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/index.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/index.php 2008-02-14 23:22:21 UTC (rev 243) @@ -35,21 +35,21 @@ require_once("lib/php/common/WimbaLib.php"); $course_id = optional_param('id', 0, PARAM_INT); // course -$createWorkflow = optional_param('createWorkflow', "false", PARAM_ALPHA); // course +$createWorkflow = optional_param('createWorkflow', false, PARAM_BOOL); // course -if (! $course = get_record("course", "id", $course_id)) { - error("Course ID is incorrect"); +if (! $course = get_record("course", "id", $course_id)) +{ + error("Course ID is incorrect"); } require_login($course->id); -add_to_log($course->id, "voicetool", "view all", "index.php?id=$course->id", ""); - $strvoicetools = get_string("modulenameplural", "voicetools"); $strvoicetool = get_string("modulename", "voicetools"); $navigation = array(); -if ($course->id != SITEID) { +if ($course->id != SITEID) +{ $navigation[$course->shortname] = "$CFG->wwwroot/course/view.php?id=$course->id"; } $navigation[$strvoicetools] = ""; @@ -70,7 +70,10 @@ $url_params = get_url_params($course->id); //create the url which all the parameters needed -$url="welcome.php?id=".$course->id."&".$url_params."&time=".time()."&createWorkflow=".$createWorkflow; +$url="welcome.php?id=".$course->id. + "&".$url_params. + "&time=".time(). + "&createWorkflow=".$createWorkflow; ?> <br> Modified: branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/lang/en/voicetools.php 2008-02-14 23:22:21 UTC (rev 243) @@ -54,6 +54,9 @@ $string['Invalid account/secret'] = 'The account/password you entered is not acknowledged by the server. Please, click Continue and verify the values you entered match with the values in the Voice Tools Server.'; $string['integrationversion'] = 'Integration Version'; $string['vtversion'] = 'Voice Tools Version'; +$string['loglevel'] = 'Set Log Level:'; +$string['viewlogs'] = 'View Logs...'; + $string["launch_calendar"]="Launch the Voice "; $string["voicetoolstype"]="Associated Voice Tool:"; $string["activity_name"]="Activity Name:"; Modified: branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/lang/en_utf8/voicetools.php 2008-02-14 23:22:21 UTC (rev 243) @@ -54,6 +54,9 @@ $string['Invalid account/secret'] = 'The account/password you entered is not acknowledged by the server. Please, click Continue and verify the values you entered match with the values in the Voice Tools Server.'; $string['integrationversion'] = 'Integration Version'; $string['vtversion'] = 'Voice Tools Version'; +$string['loglevel'] = 'Set Log Level:'; +$string['viewlogs'] = 'View Logs...'; + $string["launch_calendar"]="Launch the Voice "; $string["voicetoolstype"]="Associated Voice Tool:"; $string["activity_name"]="Activity Name:"; @@ -107,7 +110,7 @@ $string['private_comment']='Student cannot view other student\'s discussion threads'; $string['comment_slide']= "Student can comment the slides"; $string['private_slide']= "Make slide comments private"; - $string['private_slide_comment']= "Students cannot view other student's comments"; +$string['private_slide_comment']= "Students cannot view other student's comments"; $string['view_other_thread']="Student can view other student\'s discussion threads" ; $string['post_delay']= "Podcast auto-published after : "; @@ -156,10 +159,10 @@ $string['presentation'] = 'Voice Presentation - '; $string['VoicePresentation'] = 'Voice Presentation'; $string['voicepresentations'] = 'Voice Presentations'; - $string['podcaster'] = 'Wimba Podcaster'; - $string['Podcaster'] = 'Wimba Podcaster'; - $string['podcasters'] = 'Podcasters'; - $string['pc'] = 'Podcaster - '; +$string['podcaster'] = 'Wimba Podcaster'; +$string['Podcaster'] = 'Wimba Podcaster'; +$string['podcasters'] = 'Podcasters'; +$string['pc'] = 'Podcaster - '; $string['settings']="Settings"; $string['archivesession'] = 'Archive Sessions'; $string['new']="New"; @@ -423,7 +426,6 @@ $string['tooltipVT_1_student'] = "Available to students"; $string['configuration_test_vt_failed_sentence_start1'] = "The test of your Voice Tools server configuration settings was unsuccessful."; $string['configuration_test_vt_successful_sentence'] = "The test of your Voice Tools server configuration settings was successful. - The configuration settings have been saved."; $string['configuration_test_vtfailedAccount'] = "Please check the account name and the password s and retry."; $string['configuration_test_vtfailedConnection'] = "Please check the Voice Tools Server Url parameters and retry."; Modified: branches/team/Thomas/moodle/mod/voicetools/lang/fr/voicetools.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lang/fr/voicetools.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/lang/fr/voicetools.php 2008-02-14 23:22:21 UTC (rev 243) @@ -43,6 +43,9 @@ $string['integrationversion'] = 'Version du module d\'Integration'; $string['emptyAdminUsername'] = 'Nom d\'Utilisateur Administrateur vide'; $string['emptyAdminPassword'] = 'Mot de Passe Administrateur vide'; +$string['loglevel'] = 'Choisissez de niveau de Log:'; +$string['viewlogs'] = 'Voir les Logs...'; + $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'; Modified: branches/team/Thomas/moodle/mod/voicetools/lang/fr_utf8/voicetools.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lang/fr_utf8/voicetools.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/lang/fr_utf8/voicetools.php 2008-02-14 23:22:21 UTC (rev 243) @@ -43,6 +43,9 @@ $string['integrationversion'] = 'Version du module d\'Integration'; $string['emptyAdminUsername'] = 'Nom d\'Utilisateur Administrateur vide'; $string['emptyAdminPassword'] = 'Mot de Passe Administrateur vide'; +$string['loglevel'] = 'Choisissez de niveau de Log:'; +$string['viewlogs'] = 'Voir les Logs...'; + $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'; Modified: branches/team/Thomas/moodle/mod/voicetools/lib.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/lib.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/lib.php 2008-02-14 23:22:21 UTC (rev 243) @@ -28,14 +28,20 @@ /* $Id: lib.php 56815 2007-12-04 15:08:45Z thomasr $ */ /// Library of functions and constants for module voicetools +if (!function_exists('getKeysOfGeneralParameters')) { + require_once('lib/php/common/WimbaLib.php'); +} require_once($CFG->libdir.'/datalib.php'); require_once($CFG->dirroot.'/course/lib.php'); require_once('lib/php/vt/WimbaVoicetoolsAPI.php'); -require_once('lib/php/common/WimbaCommons.php'); + + + define("VOICETOOLS_MODULE_VERSION", "3.1.2"); -$VOICETOOLS_LOGS = "logs.php"; //file use to the logs +define("WV", "voicetools"); + /** * Validate the data in passed in the configuration page * @param $config - the information from the form mod.html @@ -53,27 +59,32 @@ if(empty($config->servername)) { + wimba_add_log(WIMBA_ERROR,WV,get_string('wrongconfigurationURLunavailable', 'voicetools')); error(get_string('wrongconfigurationURLunavailable', 'voicetools'), $_SERVER["HTTP_REFERER"]); } if(empty($config->adminusername)) { - error(get_string('emptyAdminUsername', 'voicetools'), $_SERVER["HTTP_REFERER"]); + wimba_add_log(WIMBA_ERROR,WV,get_string('emptyAdminUsername', 'voicetools')); + error(get_string('emptyAdminUsername', 'voicetools'), $_SERVER["HTTP_REFERER"]); } if(empty($config->adminpassword)) { - error(get_string('emptyAdminPassword', 'voicetools'), $_SERVER["HTTP_REFERER"]); + wimba_add_log(WIMBA_ERROR,WV,get_string('emptyAdminPassword', 'voicetools')); + error(get_string('emptyAdminPassword', 'voicetools'), $_SERVER["HTTP_REFERER"]); } if ($config->servername{strlen($config->servername)-1} == '/') { - error(get_String('trailingSlash', 'voicetools'), $_SERVER["HTTP_REFERER"]); + wimba_add_log(WIMBA_ERROR,WV,get_String('trailingSlash', 'voicetools')); + error(get_String('trailingSlash', 'voicetools'), $_SERVER["HTTP_REFERER"]); } - + if (!preg_match('/^http:\/\//', $config->servername) && !preg_match('/^https:\/\//', $config->servername)) { - error(get_String('trailingHttp', 'voicetools'), $_SERVER["HTTP_REFERER"]); + wimba_add_log(WIMBA_ERROR,WV,get_String('trailingHttp', 'voicetools')); + error(get_String('trailingHttp', 'voicetools'), $_SERVER["HTTP_REFERER"]); } //check if the api account filled is correct and allowed @@ -83,12 +94,18 @@ { if(get_string($result, 'voicetools' ) == "[[]]") {//the error description is not in the bundle + wimba_add_log(WIMBA_ERROR,WV,$result); error($result, 'javascript:history.back();'); } else{ + wimba_add_log(WIMBA_ERROR,WV,get_String($result, 'voicetools')); error(get_string($result, 'voicetools' ), 'javascript:history.back();'); } } + //to make sure that all the necessary module are installed + wimba_add_log(WIMBA_INFO,WV,"php info :\n" .print_r(get_loaded_extensions(),true)); + + wimba_add_log(WIMBA_INFO,WV,"The module is well configured"); } function voicetools_add_instance($voicetool) { @@ -97,6 +114,8 @@ /// will create a new instance and return the id number /// of the new instance. global $USER; + print_r($voicetool); + //get the resource information(type and id) list($rid, $type) = explode(";", $voicetool->resource); @@ -104,7 +123,9 @@ $voicetool->rid=$rid; $voicetool->name=get_string("$type","voicetools").$voicetool->name; - if (!$voicetool->id = insert_record('voicetools', $voicetool)) { + if (!$voicetool->id = insert_record('voicetools', $voicetool)) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to add a new instance"); return false; } @@ -112,7 +133,10 @@ { voicetools_addCalendarEvent($voicetool); } - + + wimba_add_log(WIMBA_INFO,WV,"Add Instance".$voicetool->id); + //for the debug + wimba_add_log(WIMBA_DEBUG,WV,print_r($voicetool, true )); return $voicetool->id; } @@ -120,166 +144,177 @@ /// Given an object containing all the necessary data, /// (defined by the form in mod.html) this function /// will update an existing instance with new data. - global $USER; + global $USER; + + //get the course_module instance linked to the liveclassroom instance + if (! $cm = get_coursemodule_from_instance("voicetools", $voicetool->instance, $voicetool->course)) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to update the instance : ".$voicetool->instance); + error("Course Module ID was incorrect"); + } + + if($voicetool->section != $cm->section)//the scetion has changed + { + //Find the right section in the course_section + if (!$section = get_record("course_sections", "id", $cm->section)) + { + return false; + } + //delete in the course section + if (! delete_mod_from_section($cm->id, $cm->section)) + { + return false; + } + + //update the course module section + if (! $sectionid = add_mod_to_section($voicetool) ) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to update the instance : ".$voicetool->instance); + error("Could not add the new course module to that section"); + } + //update the course modules + if (! set_field("course_modules", "section", $sectionid, "id", $cm->id)) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to update the instance : ".$voicetool->instance); + error("Could not update the course module with the correct section"); + } + } - //get the course_module instance linked to the liveclassroom instance - if (! $cm = get_coursemodule_from_instance("voicetools", $voicetool->id, $voicetool->course)) - { - error("Course Module ID was incorrect"); - } - - if($voicetool->section != $cm->section)//the scetion has changed - { - //Find the right section in the course_section - if (!$section = get_record("course_sections", "id", $cm->section)) - { - return false; - } - //delete in the course section - if (! delete_mod_from_section($cm->id, $cm->section)) - { - return false; - } - - //update the course module section - if (! $sectionid = add_mod_to_section($voicetool) ) - { - error("Could not add the new course module to that section"); - } - //update the course modules - if (! set_field("course_modules", "section", $sectionid, "id", $cm->id)) - { - error("Could not update the course module with the correct section"); - } - } - - list($rid, $type) = explode(";", $voicetool->resource); - $voicetool->timemodified = time(); - $voicetool->id = $voicetool->instance; - $voicetool->rid=$rid; - $voicetool->name=get_string("$type","voicetools").$voicetool->name; - - if (!$voicetool->id = update_record('voicetools', $voicetool)) - { + list($rid, $type) = explode(";", $voicetool->resource); + $voicetool->timemodified = time(); + $voicetool->id = $voicetool->instance; + $voicetool->rid=$rid; + $voicetool->name=get_string("$type","voicetools").$voicetool->name; + + if (!$voicetool->id = update_record('voicetools', $voicetool)) + { return false; - } - - if(isset($voicetool->calendar_event) && $voicetool->calendar_event==true) - {//no problem - voicetools_addCalendarEvent($voicetool,$voicetool->id ); - } - else - { - voicetools_deleteCalendarEvent($voicetool->id ); - } - - return $voicetool->id ; + } + + if(isset($voicetool->calendar_event) && $voicetool->calendar_event==true) + {//no problem + voicetools_addCalendarEvent($voicetool,$voicetool->id ); + } + else + { + voicetools_deleteCalendarEvent($voicetool->id ); + } + + wimba_add_log(WIMBA_INFO,WV,"Update of the instance : ".$voicetool->id); + return $voicetool->id ; } function voicetools_delete_instance($id) { - /// Given an ID of an instance of this module, - /// this function will permanently delete the instance - /// and any data that depends on it. - $result = true; - if (! $voicetool = get_record("voicetools", "id", "$id")) - { - return false; - } - # Delete any dependent records here # - if (! $instanceNumber=delete_records("voicetools", "id", "$voicetool->id")) - { - add_to_log($voicetool->course, "voicetools", "Delete activity",voicetools_send_logs("errorDeleteInstance","voicetoolsId=".$instanceNumber), "Activity ".$voicetool->name." deletion failed"); - $result = false; - } - - voicetools_deleteCalendarEvent("$voicetool->id"); - // delete the related calendar event + /// Given an ID of an instance of this module, + /// this function will permanently delete the instance + /// and any data that depends on it. + $result = true; + if (! $voicetool = get_record("voicetools", "id", $id)) + { + return false; + } + # Delete any dependent records here # + if (! $instanceNumber=delete_records("voicetools", "id", $voicetool->id)) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to delete the instance : ".$voicetool->id); + $result = false; + } + + voicetools_deleteCalendarEvent($voicetool->id); + // delete the related calendar event - return $result; + return $result; } function voicetools_addCalendarEvent($activity_informations){ - global $CFG; - - //get some complementary of the resource - $resource=get_record('voicetools_resources','rid',$activity_informations->rid); - - $event = new Object(); - $event->name = $activity_informations->name; - $event->description = $activity_informations->description."<br><a href=".$CFG->wwwroot."/mod/voicetools/view.php?id=".$activity_informations->id."&action=launchCalendar target=_self >".get_string("launch_calendar","voicetools").$resource->type." ...</a>"; - $event->format = 1; - $event->userid = 0; - $event->courseid = $activity_informations->course; //course event - $event->groupid = 0; - $event->modulename = 'voicetools'; - $event->instance = $activity_informations->id; - $event->eventtype = ''; - $event->visible = 1; - $event->timemodified = time(); - - if($activity_informations->course_format !="weeks" && $activity_informations->course_format !="weekscss") - {//tppics or social - $event->timestart = mktime($activity_informations->start_hr,$activity_informations->start_min,0,$activity_informations->start_month,$activity_informations->start_day,$activity_informations->start_year); - if( $event->timestart < time()) - { - error(get_string("date_error","voicetools"),$_SERVER["HTTP_REFERER"]); - } - } - else - { - $event->timestart = mktime($activity_informations->start_hr,$activity_informations->start_min,0,date('m',$activity_informations->calendar_start),date('d',$activity_informations->calendar_start),date('Y',$activity_informations->calendar_start)); - } - - $duration = $informations->duration_hr*3600 + $informations->duration_min*60; - if ($duration < 0) - { - $event->timeduration = 0; - } - else - { - $event->timeduration = $duration; - } - - if(!$oldEvent=get_record('event','instance',$activity_informations->id)) //old event exsit - { - $event->id = $oldEvent->id ; - $result=update_record('event', $event); - } - else - { - $result = insert_record('event', $event); - } - return $result; + global $CFG; + //get some complementary of the resource + $resource=get_record('voicetools_resources','rid',$activity_informations->rid); + + $event = new Object(); + $event->name = $activity_informations->name; + $event->description = $activity_informations->description."<br><a href=".$CFG->wwwroot."/mod/voicetools/view.php?id=".$activity_informations->id."&action=launchCalendar target=_self >".get_string("launch_calendar","voicetools").$resource->type." ...</a>"; + $event->format = 1; + $event->userid = 0; + $event->courseid = $activity_informations->course; //course event + $event->groupid = 0; + $event->modulename = 'voicetools'; + $event->instance = $activity_informations->id; + $event->eventtype = ''; + $event->visible = 1; + $event->timemodified = time(); + + if($activity_informations->course_format !="weeks" && $activity_informations->course_format !="weekscss") + {//tppics or social + $event->timestart = mktime($activity_informations->start_hr,$activity_informations->start_min,0,$activity_informations->start_month,$activity_informations->start_day,$activity_informations->start_year); + if( $event->timestart < time()) + { + error(get_string("date_error","voicetools"),$_SERVER["HTTP_REFERER"]); + } + } + else + { + $event->timestart = mktime($activity_informations->start_hr,$activity_informations->start_min,0,date('m',$activity_informations->calendar_start),date('d',$activity_informations->calendar_start),date('Y',$activity_informations->calendar_start)); + } + + $duration = $activity_informations->duration_hr*3600 + $activity_informations->duration_min*60; + if ($duration < 0) + { + $event->timeduration = 0; + } + else + { + $event->timeduration = $duration; + } + + wimba_add_log(WIMBA_DEBUG,WV,"Add calendar event\n".print_r($event, true )); + + $oldEvent=get_record('event','instance',$activity_informations->id); + if(!empty($oldEvent) && $oldEvent!=false) //old event exsit + { + $event->id = $oldEvent->id ; + $result=update_record('event', $event); + } + else + { + $result = insert_record('event', $event); + } + + return $result; } function voicetools_deleteCalendarEvent($instanceNumber){ /// Basic event record for the database. - global $CFG; - - if(!$event=get_record('event','instance',$instanceNumber)){ - return false; - } - $result=delete_records("event", "id", $event->id); + global $CFG; + + if(!$event=get_record('event','instance',$instanceNumber)) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to delete calendar event : ".$instanceNumber); + return false; + } + $result=delete_records("event", "id", $event->id); } function voicetools_delete_resource($rid) { - /// Given an ID of an instance of this module, - /// this function will permanently delete the instance - /// and any data that depends on it. - - if (! $voicetool = get_record("voicetools_resources", "rid", $rid)) { - return false; - } - # Delete any dependent records here # - if (! delete_records("voicetools_resources", "id", "$voicetool->id")) { - return false; - } + /// Given an ID of an instance of this module, + /// this function will permanently delete the instance + /// and any data that depends on it. + + if (! $voicetool = get_record("voicetools_resources", "rid", $rid)) { + wimba_add_log(WIMBA_ERROR,WV,"Problem to delete a resource : ".$rid); + return false; + } + # Delete any dependent records here # + if (! delete_records("voicetools_resources", "id", "$voicetool->id")) { + wimba_add_log(WIMBA_ERROR,WV,"Problem to delete a resource : ".$rid); + return false; + } - return true; + return true; } function voicetools_user_outline($course, $user, $mod, $voicetool) { @@ -288,8 +323,7 @@ /// Used for user activity reports. /// $return->time = the time they did it /// $return->info = a short text description - - return $return; + return $return; } function voicetools_user_complete($course, $user, $mod, $voicetool) { @@ -395,37 +429,41 @@ /// and any data that depends on it. //delete the resource of the vt list - voicetools_delete_resource($id); + $result = true; - - if ($voicetools = get_records("voicetools", "rid", $id)) { - + wimba_add_log(WIMBA_INFO,WV,"Delete the resouce ". $id); + if ($voicetools = get_records("voicetools", "rid", $id)) + { # Delete any dependent records here # - foreach($voicetools as $voicetool){ + foreach($voicetools as $voicetool){ //get the course_module instance linked to the liveclassroom instance - if(! $cm = get_coursemodule_from_instance("voicetools", $voicetool->id, $voicetool->course)) { - error("Course Module ID was incorrect"); + $cm=get_coursemodule_from_instance("voicetools", $voicetool->id, $voicetool->course); + + if(!empty($cm)) //old event exsit + { + if (! delete_course_module($cm->id)) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to delete the course module : ".$cm->id); + $result = false; + //Delete a course module and any associated data at the course level (events) + } + //delete the instance + if (! delete_records("voicetools", "id", $voicetool->id)) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to delete all the activities associated to the voice tools"); + $result = false; + } + //delete in the course section too + if (! delete_mod_from_section($cm->id, $cm->section)) + { + wimba_add_log(WIMBA_ERROR,WV,"Could not delete the ".$cm->id." from that section : ".$cm->section); + $result = false; + } + voicetools_deleteCalendarEvent($voicetool->id); } - - if (! delete_course_module($cm->id)) { - add_to_log($voicetool->course, "voicetools", voicetools_send_logs("errorDeleteAllcm","rid=".$voicetool->id."&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)"); - $result = false; - //Delete a course module and any associated data at the course level (events) - // notify("Could not delete the $cm->id (coursemodule)"); - } - //delete the instance - if (! delete_records("voicetools", "id", $voicetool->id)) { - add_to_log($liveclassrooms->course, "voicetools", voicetools_send_logs("errorDeleteAlldb","id=".$voicetool->id), "Delete all activities", "All activities associated to the vocie tools have not been deleted from the voice tools database"); - $result = false; - } - //delete in the course section too - if (! delete_mod_from_section($cm->id, "$cm->section")) { - add_to_log($voicetool->course, "voicetools", voicetools_send_logs("errorDeleteAllsection","rid=".$voicetool->id."&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section"); - $result = false; - } } } - + voicetools_delete_resource($id); return $result; } @@ -438,27 +476,31 @@ */ function voicetools_get_voicetools_list($courseId) { $tools_list = get_records('voicetools_resources','course',$courseId); - $result= array(); - $result["rid"]= array(); - $result["info"]= array(); - - if(empty($tools_list)){ - return null; - - + $result= array(); + $result["rid"]= array(); + $result["info"]= array(); + + if(empty($tools_list)) + { + wimba_add_log(WIMBA_INFO,WV,"No resources have been created yet"); + return null; } - else if($tools_list == false) { - error( "Response get_board_list : query to database failed"); - return "error_moodleDatabase"; + else if($tools_list == false) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to get the list of resources"); + error( "Response get_board_list : query to database failed"); + return "error_moodleDatabase"; } $result = array(); foreach($tools_list as $tool) { - - if($tool->type!="recorder"){ - $result["rid"][]= $tool->rid; - $result["info"][$tool->rid]= $tool; - } + if($tool->type!="recorder") + { + $result["rid"][]= $tool->rid; + $result["info"][$tool->rid]= $tool; + } } + wimba_add_log(WIMBA_DEBUG,WV,"list of resource :\n".print_r($result, true )); + return $result; } @@ -470,38 +512,47 @@ function voicetools_get_voicetool_informations($rid) { $tool = get_record('voicetools_resources','rid',$rid); - + if(empty($tool)) { - return null; + wimba_add_log(WIMBA_INFO,WV,"No resources have been created yet"); + return null; } else if($tool == false) { - error( "Response get_board_list : query to database failed"); - return "error_moodleDatabase"; + wimba_add_log(WIMBA_ERROR,WV,"Problem to get the list of resources"); + error( "Response get_board_list : query to database failed"); + return "error_moodleDatabase"; } - + wimba_add_log(WIMBA_DEBUG,WV,"list of resource :\n".print_r($tool, true )); + return $tool; } function vocietools_get_recorder_rid($courseId) { - $tools_list = get_records('voicetools_resources','course',$courseId); - - if(empty($tools_list)){ - return NULL; - - } - else if($tools_list == false) { - error( "Response get_board_list : query to database failed"); - return "error_moodleDatabase"; - } - $result = array(); - foreach($tools_list as $tool) { - if($tool->type=="recorder") - return $tool->rid; - - } - return NULL; + $tools_list = get_records('voicetools_resources','course',$courseId); + + if(empty($tools_list)) + { + wimba_add_log(WIMBA_INFO,WV,"No resources have been created yet"); + return NULL; + } + else if($tools_list == false) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to get the list of resources"); + error( "Response get_board_list : query to database failed"); + return "error_moodleDatabase"; + } + + $result = array(); + foreach($tools_list as $tool) { + if($tool->type=="recorder") + { + wimba_add_log(WIMBA_DEBUG,WV,$tool->rid ." : rid of the recorder for the course ".$courseId); + return $tool->rid; + } + } + return NULL; } @@ -512,13 +563,12 @@ */ function voicetools_get_voiceboard_Informations($rid) { + if(!($board_informations = get_record('voicetools_resources','rid',$rid))) + { + error( "Response get_board_list : query to database failed"); + return "error_moodleDatabase"; + } - if(!($board_informations = get_record('voicetools_resources','rid',$rid))) { - error( "Response get_board_list : query to database failed"); - return "error_moodleDatabase"; - } - - return $board_informations; } @@ -532,7 +582,6 @@ */ function voicetools_get_event_calendar($id) { - $event = get_record('event','instance',$id); if($event==false || empty($event)) { @@ -543,74 +592,62 @@ function voicetools_update_recorder_informations($blockId,$comment,$title) { - $oldRecorder = get_record('voicetools_recorder','bid',$blockId); - if($oldRecorder==false){ - - return false; - }else if(empty($oldRecorder)) { //no data saved before + $oldRecorder = get_record('voicetools_recorder','bid',$blockId); + if($oldRecorder==false) + { + wimba_add_log(WIMBA_ERROR,WV,"Problem to get the recorder information"); + return false; + } + else if(empty($oldRecorder)) + { //no data saved before + $recorder->bid=$blockId; + $recorder->comment= $comment; + $recorder->title=$title; + $id=insert_record("voicetools_recorder", $recorder); + } + else + { + $oldRecorder->title = $title; + $oldRecorder->comment = $comment; + $id=update_record("voicetools_recorder", $oldRecorder); + } + return $id; +} - $recorder->bid=$blockId; - $recorder->comment= $comment; - $recorder->title=$title; - - $id=insert_record("voicetools_recorder", $recorder); - - }else{ - $oldRecorder->title = $title; - $oldRecorder->comment = $comment; - $id=update_record("voicetools_recorder", $oldRecorder); - } - return $id; -} function voicetools_get_recorder_informations($blockId) { - $recorder = get_record('voicetools_recorder','bid',$blockId); - if($recorder==false || empty($recorder)) { - - $recorder->bid=$blockId; - $recorder->comment= "Description"; - $recorder->title="Announcement"; - - $id=insert_record("voicetools_recorder", $recorder); - - } - $recorder = get_record('voicetools_recorder','bid',$blockId); - if($recorder==false || empty($recorder)) { - - return false; + $recorder = get_record('voicetools_recorder','bid',$blockId); + if($recorder==false || empty($recorder)) + { + $recorder->bid=$blockId; + $recorder->comment= "Description"; + $recorder->title="Announcement"; + $id=insert_record("voicetools_recorder", $recorder); + } + + $recorder = get_record('voicetools_recorder','bid',$blockId); + if($recorder==false || empty($recorder)) + { + return false; } - return $recorder; + wimba_add_log(WIMBA_DEBUG,WV,"Recorder informations : \n".print_r($recorder, true )); + return $recorder; } function voicetools_get_version() { - $answer = voicetools_api_get_version(); - - if (!strcmp($answer, "error")) { - return get_string('voicetools', "error"); - } - elseif (!strcmp($answer, 'unknown')) { - return get_string('voicetools', 'unknown'); - } - - return $answer; + $answer = voicetools_api_get_version(); + + if (!strcmp($answer, "error")) + { + return get_string('voicetools', "error"); + } + elseif (!strcmp($answer, 'unknown')) + { + return get_string('voicetools', 'unknown'); + } + + return $answer; } -/* -* Send info to the logs system -* @param $type : type of the log -* @param $parameters : string with the parameters needed -* return a string which is the link to the logs file -*/ -function voicetools_send_logs($type,$parameters) { - - global $VOICETOOLS_LOGS; - - - $link = $VOICETOOLS_LOGS."?type=$type"; - $link .= "&$parameters"; - $link .= "&time=".time(); - - return $link; -} ?> Modified: branches/team/Thomas/moodle/mod/voicetools/manageAction.php =================================================================== --- branches/team/Thomas/moodle/mod/voicetools/manageAction.php 2008-02-14 23:21:43 UTC (rev 242) +++ branches/team/Thomas/moodle/mod/voicetools/manageAction.php 2008-02-14 23:22:21 UTC (rev 243) @@ -42,14 +42,15 @@ $messageAction=optional_param("messageAction",""); $notool=optional_param("novoicetools","false"); $createWorkflow = optional_param("createWorkflow", false, PARAM_BOOL); // course - + $keys=array_merge(getKeysOfGeneralParameters(),getKeyWimbaVoiceForm()); foreach($keys as $param){ $value=optional_param($param["value"],$param["default_value"],$param["type"]); if($value!=null) $params[$param["value"]] = $value; -} +} +wimba_add_log(WIMBA_DEBUG,WV,"manageAction : parameters \n" . print_r($params,true)); require_login($params["enc_course_id"]); $vtAction = new vtAction($params); @@ -64,15 +65,19 @@ $messageType = ""; if ($session->error == false && $session != NULL ) { - if ($params['action'] == 'launch') { + if ($params['action'] == 'launch') + { $session->setCurrentVtUSer($params["type"]); - if ($params["studentView"] == "true") { + + if ($params["studentView"] == "true") + { $session->setVtUserRigths($params["type"], "student"); } $resource = voicetools_api_get_resource($params["resource_id"]); $result = $vtAction->getVtSession($resource, $session->getVtUser(), $session->getVtUserRigths()); if ($result != NULL) { + wimba_add_log(WIMBA_DEBUG,WV,"launch the ". $params["type"] . ", nid =" .$result->getNid()); redirection($CFG->voicetools_servername . '/' . $params["type"] . '?action=display_popup&nid=' . $result->getNid()); } else @@ -100,23 +105,20 @@ $messageAction = "created"; $messageProduct = "pc"; } - + if ($result != NULL && $result->error != "error") { - $params["resource_id"] = storeResource($result->getRid(), $params); - - if (empty ($params["resource_id"])) + $resource_id = storeResource($result->getRid(), $session->getCourseId(), $params); + + if (empty ($resource_id)) { - error_log(__FUNCTION__ . " : Problem to add the new resource on the database", TRUE); + wimba_add_log(WIMBA_ERROR,WV,"manageAction : Problem to add the resource into the database"); redirection($redirectionUrl. '&error=problem_bd'); } - if(VTAPI_DEBUG) { - error_log(__FUNCTION__ . " : Board Created and added on the database, rid=" . $result->getRid(), TRUE); - } } else { - error_log(__FUNCTION__ . " : Problem to add the new resource on the vt server", TRUE); + wimba_add_log(WIMBA_ERROR,WV,"manageAction :Problem ... [truncated message content] |
From: <tro...@us...> - 2008-02-14 23:21:44
|
Revision: 242 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=242&view=rev Author: trollinger Date: 2008-02-14 15:21:43 -0800 (Thu, 14 Feb 2008) Log Message: ----------- -add log to the common files -fix a couple of small issues Modified Paths: -------------- branches/team/Thomas/integrations_common/php/common/WimbaLib.php branches/team/Thomas/integrations_common/php/common/WimbaUI.php branches/team/Thomas/integrations_common/php/common/WimbaXml.php branches/team/Thomas/integrations_common/php/lc/lcapi.php branches/team/Thomas/integrations_common/php/vt/VtAction.php branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php branches/team/Thomas/integrations_common/web/js/verifForm.js Added Paths: ----------- branches/team/Thomas/integrations_common/web/pictures/items/voice_tools.png Modified: branches/team/Thomas/integrations_common/php/common/WimbaLib.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-02-11 21:25:53 UTC (rev 241) +++ branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-02-14 23:21:43 UTC (rev 242) @@ -8,6 +8,7 @@ /** * Returns the keys of the general parameters passed by GET or POST */ + function getKeysOfGeneralParameters() { return array( @@ -20,8 +21,8 @@ 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), + array("value" => "studentView", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "createWorkflow", "type" => PARAM_BOOL, "default_value" => false), array("value" => "action", "type" => PARAM_ALPHA, "default_value" => null), array("value" => "resource_id", "type" => PARAM_CLEAN, "default_value" => "0"), array("value" => "error", "type" => PARAM_CLEAN, "default_value" => ""), @@ -54,34 +55,34 @@ function getKeyWimbaVoiceForm() { return array ( - array("value" => "longname", "type" => PARAM_CLEAN, "default_value" => ""), + array("value" => "longname", "type" => PARAM_CLEAN, "default_value" => ""), array("value" => "description", "type" => PARAM_CLEAN, "default_value" => "dd"), - array("value" => "led", "type" => PARAM_ALPHA, "default_value" => "instructor"), + array("value" => "led", "type" => PARAM_ALPHA, "default_value" => "student"), array("value" => "audio_format", "type" => PARAM_CLEAN, "default_value" => "medium"), - array("value" => "max_length", "type" => PARAM_INT, "default_value" => "0"), - array("value" => "delay", "type" => PARAM_INT, "default_value" => "0"), + array("value" => "max_length", "type" => PARAM_INT, "default_value" => "0"), + array("value" => "delay", "type" => PARAM_INT, "default_value" => "0"), - array("value" => "short_title", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "chrono_order", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "show_reply", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "show_forward", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "show_compose", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "filter", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "short_title", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "chrono_order", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "show_reply", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "show_forward", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "show_compose", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "filter", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "accessAvailable", "type" => PARAM_BOOL, "default_value" => "0"), - array("value" => "start_date", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "start_month", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "start_day", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "start_year", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "start_hr", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "start_min", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "end_date", "type" => PARAM_ALPHA, "default_value" => "false"), - array("value" => "end_month", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "end_day", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "end_year", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "end_hr", "type" => PARAM_ALPHA, "default_value" => "0"), - array("value" => "end_min", "type" => PARAM_ALPHA, "default_value" => "0"), + array("value" => "accessAvailable", "type" => PARAM_BOOL, "default_value" => "0"), + array("value" => "start_date", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "start_month", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_day", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_year", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_hr", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "start_min", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_date", "type" => PARAM_ALPHA, "default_value" => "false"), + array("value" => "end_month", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_day", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_year", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_hr", "type" => PARAM_ALPHANUM, "default_value" => "0"), + array("value" => "end_min", "type" => PARAM_ALPHANUM, "default_value" => "0"), ); } @@ -273,6 +274,7 @@ function storeResource($rid,$course_id, $params) { + $voicetools = new Object(); $voicetools->rid = $rid; $voicetools->course = $course_id; @@ -289,7 +291,7 @@ { $start_hr = intval($params["start_hr"]); $start_min = intval($params["start_min"]); - $start_month = intval($params["start_months"]); + $start_month = intval($params["start_month"]); $start_day = intval($params["start_day"]); $start_year = intval($params["start_year"]); $voicetools->start_date = mktime($start_hr, $start_min, 0, $start_month, $start_day, $start_year); @@ -302,7 +304,7 @@ if ($params["end_date"] == "true") { $end_hr = intval($params["end_hr"]); $end_min = intval($params["end_min"]); - $end_month = intval($params["end_months"]); + $end_month = intval($params["end_month"]); $end_day = intval($params["end_day"]); $end_year = intval($params["end_year"]); $voicetools->end_date = mktime($end_hr, $end_min, 0, $end_month, $end_day, $end_year); @@ -327,7 +329,7 @@ { $start_hr = intval($params["start_hr"]); $start_min = intval($params["start_min"]); - $start_month = intval($params["start_months"]); + $start_month = intval($params["start_month"]); $start_day = intval($params["start_day"]); $start_year = intval($params["start_year"]); $voicetools->start_date = mktime($start_hr, $start_min, 0, $start_month, $start_day, $start_year); @@ -340,7 +342,7 @@ if ($params["end_date"] == "true") { $end_hr = intval($params["end_hr"]); $end_min = intval($params["end_min"]); - $end_month = intval($params["end_months"]); + $end_month = intval($params["end_month"]); $end_day = intval($params["end_day"]); $end_year = intval($params["end_year"]); $voicetools->end_date = mktime($end_hr, $end_min, 0, $end_month, $end_day, $end_year); Modified: branches/team/Thomas/integrations_common/php/common/WimbaUI.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-02-11 21:25:53 UTC (rev 241) +++ branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-02-14 23:21:43 UTC (rev 242) @@ -526,7 +526,7 @@ "javascript:launchAjaxRequest('getXmlListPanel.php','',true,'all')", "advanced_Ok"); - if ($createWorkflow == "true") + if ($createWorkflow == true) { $this->xml->createValidationButtonElement( get_string("validationElement_cancel", "voicetools"), @@ -556,7 +556,7 @@ $this->xml->createValidationButtonElement( get_string("validationElement_saveAll", "voicetools"), "action", - "javascript:submitForm('manageAction.php','update','" . $this->currentObject->getRid() . "')", + "javascript:submitForm('manageAction.php','update','" . $this->currentObject->getRid() . "','" . $createWorkflow . "')", "setting_Save"); } } @@ -603,15 +603,12 @@ "rows" => "4", "cols" => "30" ); - if ($this->currentObject != null) + $display = ""; + if (isset ($this->currentObject)) { - $parameters["value"] = $this->currentObject->getDescription(); + $display = $this->currentObject->getDescription(); } - else - { - $parameters["value"] = ""; - } - $this->xml->addTextAreaElement($parameters); + $this->xml->addTextAreaElement($parameters,$display); $this->xml->createLinePart(); $this->xml->createLine(); @@ -1625,14 +1622,13 @@ "rows" => "4", "cols" => "30" ); + + $display = ""; if (isset ($this->currentObject)) { - $parameters["value"] = $this->currentObject->getDescription(); + $display = $this->currentObject->getDescription(); } - else{ - $parameters["value"] = ""; - } - $this->xml->addTextAreaElement($parameters); + $this->xml->addTextAreaElement($parameters,$display); $this->xml->createLinePart(); $this->xml->createLine(); @@ -1681,7 +1677,7 @@ $parameters = array ( "type" => "checkbox", - "value" => "instructor", + "value" => "true", "id" => "show_compose", "name" => "show_compose" ); @@ -2072,7 +2068,7 @@ $optionsMonth); } //add space - $this->xml->addSimpleLineElement("space"); + $this->xml->addSimpleLineElement("label", " "); if ($this->currentObjectInformations != null) { $optionsDay = $this->createSelectDay( @@ -2099,7 +2095,7 @@ $optionsDay); } //add space - $this->xml->addSimpleLineElement("space"); + $this->xml->addSimpleLineElement("label", " "); if ($this->currentObjectInformations != null) { $optionsYear = $this->createSelectYear( @@ -2210,8 +2206,18 @@ $this->xml->createLine(); - if ($this->endSelect == false || $this->currentObject == null) + if ($this->currentObjectInformations != null) { + $optionsMonth = $this->createSelectMonth( + $this->endSelect, + date('m', $this->currentObjectInformations->end_date)); + } + else + { + $optionsMonth = $this->createSelectMonth(); + } + if ($this->endSelect == false || $this->currentObject == null) + { $this->xml->createOptionElement( "end_month", "end_month_field", @@ -2223,12 +2229,20 @@ $this->xml->createOptionElement( "end_month", "end_month_field", - $this->createSelectMonth( - $this->endSelect, - date('m', $this->currentObjectInformations->end_date))); + $optionsMonth); } $this->xml->addSimpleLineElement("label", " "); + if ($this->currentObjectInformations != null) + { + $optionsDay = $this->createSelectDay( + $this->endSelect, + date('d', $this->currentObjectInformations->end_date)); + } + else + { + $optionsDay = $this->createSelectDay(); + } if ($this->endSelect == false || $this->currentObject == null) { $this->xml->createOptionElement( @@ -2242,12 +2256,21 @@ $this->xml->createOptionElement( "end_day", "end_day_field", - $this->createSelectDay( - $this->endSelect, - date('d', $this->currentObjectInformations->end_date))); + $optionsDay); + } $this->xml->addSimpleLineElement("label", " "); + if ($this->currentObjectInformations != null) + { + $optionsYear = $this->createSelectYear( + $this->endSelect, + date('Y', $this->currentObjectInformations->end_date)); + } + else + { + $optionsYear = $this->createSelectYear(); + } if ($this->endSelect == false || $this->currentObject == null) { $this->xml->createOptionElement( @@ -2261,12 +2284,21 @@ $this->xml->createOptionElement( "end_year", "end_year_field", - $this->createSelectYear( - $this->endSelect, - date('Y', $this->currentObjectInformations->end_date))); + $optionsYear); + } $this->xml->createLinePart(array ("style" => "date")); + if ($this->currentObjectInformations != null) + { + $optionsHour = $this->createSelectHour( + $this->endSelect, + date('G', $this->currentObjectInformations->end_date)); + } + else + { + $optionsHour = $this->createSelectHour(); + } if ($this->endSelect == false || $this->currentObject == null) { $this->xml->createOptionElement( @@ -2280,12 +2312,21 @@ $this->xml->createOptionElement( "end_hr", "end_hr_field", - $this->createSelectHour( - $this->endSelect, - date('G', $this->currentObjectInformations->end_date))); + $optionsHour); } $this->xml->addSimpleLineElement("label", " "); + if ($this->currentObjectInformations != null) + { + $optionsMinute = $this->createSelectMin( + $this->endSelect, + date('i', $this->currentObjectInformations->end_date)); + } + else + { + $optionsMinute = $this->createSelectMin(); + } + if ($this->endSelect == false || $this->currentObject == null) { $this->xml->createOptionElement( @@ -2299,9 +2340,7 @@ $this->xml->createOptionElement( "end_min", "end_min_field", - $this->createSelectMin( - $this->endSelect, - date('i', $this->currentObjectInformations->end_date))); + $optionsMinute); } $this->xml->createLinePart(); @@ -2748,6 +2787,7 @@ $allVt = array (); $list = voicetools_get_voicetools_list($this->session->hparams["course_id"]); $vtResources = voicetools_api_get_resources($list["rid"]); + if ($vtResources == null) { return null; Modified: branches/team/Thomas/integrations_common/php/common/WimbaXml.php =================================================================== --- branches/team/Thomas/integrations_common/php/common/WimbaXml.php 2008-02-11 21:25:53 UTC (rev 241) +++ branches/team/Thomas/integrations_common/php/common/WimbaXml.php 2008-02-14 23:21:43 UTC (rev 242) @@ -484,9 +484,9 @@ * Add a new textarea element * @param parameters : array of attributes ( Key = name of the attribute, Value = value of the attribute) */ - function addTextAreaElement($parameters=NULL) + function addTextAreaElement($parameters=NULL,$display) { - $this->addSimpleLineElement("textarea","",$parameters); + $this->addSimpleLineElement("textarea",$display,$parameters); } function addDivLineElement($type, $displayContext,$parameters) Modified: branches/team/Thomas/integrations_common/php/lc/lcapi.php =================================================================== --- branches/team/Thomas/integrations_common/php/lc/lcapi.php 2008-02-11 21:25:53 UTC (rev 241) +++ branches/team/Thomas/integrations_common/php/lc/lcapi.php 2008-02-14 23:21:43 UTC (rev 242) @@ -175,7 +175,7 @@ if (!isset ($this->_lcapi_config)) { // $this->lcapi_error(self::LCAPI_ENOCONF); - error_log(__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); return false; } $url = $this->_lcapi_config->server . LCAPI_COMMAND . LCAPI_FUNCTION_NOOP . "&AuthType=AuthCookieHandler" . "&AuthName=Horizon" . "&credential_0=" . $this->_lcapi_config->login . "&credential_1=" . $this->_lcapi_config->password; @@ -190,24 +190,21 @@ curl_setopt($ch, CURLOPT_TIMEOUT, 4); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": executing request: " . $url); - } - + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": executing request: " . $url); $data = curl_exec($ch); if (curl_errno($ch)) { $this->lcapi_error(LCAPI_EADDR); - error_log("HTTP Request failed: " . curl_error($ch)); + wimba_add_error(WIMBA_ERROR,WC,"HTTP Request failed: " . curl_error($ch)); return false; } preg_match("(\d*)", $data, $matches); $resp_code = $matches[0]; if ($resp_code == 204) { $this->lcapi_error(LCAPI_EAUTH); - error_log(__FUNCTION__ . ": Authentication failed (204)"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Authentication failed (204)"); return false; } else @@ -215,15 +212,13 @@ if ($resp_code != 100 && $resp_code != 301) { $this->lcapi_error(LCAPI_EAUTH); - error_log(__FUNCTION__ . ": Authentication Failed: $resp_code"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Authentication Failed: $resp_code"); return false; } } curl_close($ch); - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": Authentication successful"); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Authentication successful"); return $ch; } @@ -242,7 +237,7 @@ if (!isset ($this->_lcapi_config)) { // $this->lcapi_error(self::LCAPI_ENOCONF); - error_log(__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": LCAPI not configured in " . print_r(debug_backtrace(), true)); return false; } // $this->cookie_tstamp = $this->_lcapi_config->tmppath.self::LCAPI_COOKIE_TSTAMP; //Open the temp file to check the last modification date @@ -253,18 +248,14 @@ // $this->tstamp = time(); // echo $tstamp; // } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": cookie timestamp:" . $this->tstamp); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": cookie timestamp:" . $this->tstamp); $this->valid = $this->tstamp + LCAPI_DELAY; // 1800 seconds = 30 minutes if ((!file_exists($this->cookie_file)) || time() > $this->valid) { - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": Timestamp too old (tstamp: $tstamp, valid: $valid), re-auth necessary."); - } + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Timestamp too old (tstamp: $tstamp, valid: $valid), re-auth necessary."); + if (!$ch = $this->lcapi_authenticate()) { return false; @@ -281,22 +272,18 @@ curl_setopt($ch, CURLOPT_COOKIEJAR, $this->cookie_file); curl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookie_file); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": executing request: " . $url); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": executing request: " . $url); $response = curl_exec($ch); if (curl_errno($ch)) { $this->lcapi_error(LCAPI_ECURL); - error_log("Curl error: " . curl_error($ch)); + wimba_add_error(WIMBA_ERROR,WC,"Curl error: " . curl_error($ch)); return false; } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": Request Returned: " . $response); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Request Returned: " . $response); return $response; } /** @@ -317,24 +304,21 @@ if ($lc_respcode == 301) { $this->lcapi_error(LCAPI_EEXIST); - if (LCAPI_DEBUG) - { - error_log("User ($this->prefix.$userid, $firstname, $lastname) already exist, not created."); - } + + wimba_add_error(WIMBA_DEBUG,WC,"User ($this->prefix.$userid, $firstname, $lastname) already exist, not created."); return false; } if ($lc_respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - error_log(__FUNCTION__ . ": User Creation Failed for ($this->prefix.$userid, $firstname, $lastname) with $lc_respcode"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": User Creation Failed for ($this->prefix.$userid, $firstname, $lastname) with $lc_respcode"); return false; } - if (LCAPI_DEBUG) - { - error_log("User ($this->prefix.$userid, $firstname, $lastname) created."); - } + + wimba_add_error(WIMBA_DEBUG,WC,"User ($this->prefix.$userid, $firstname, $lastname) created."); return true; } + /** * Returns a session id (hzA) to be inserted in URLs to access the LC server * @@ -355,7 +339,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ENOSESN); - error_log(__FUNCTION__ . ": Cannot Create Session ($respcode)."); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Create Session ($respcode)."); return false; } $currentline = strtok($response, "\n"); @@ -366,20 +350,18 @@ if (empty ($currentline)) { $this->lcapi_error(LCAPI_ENOSESN); - error_log(__FUNCTION__ . ": Session was returned with good code, but session not available ($enc_params => $response)"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Session was returned with good code, but session not available ($enc_params => $response)"); return false; } $authtoken = substr($currentline, 10); if (empty ($authtoken)) { $this->lcapi_error(LCAPI_ENOSESN); - error_log(__FUNCTION__ . ": Token empty, response: $response"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Token empty, response: $response"); return false; } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": Auth OK (hzA=$authtoken)"); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Auth OK (hzA=$authtoken)"); return $authtoken; } /** @@ -405,10 +387,6 @@ */ function lcapi_create_class($roomid, $roomname, $attributes) { - if (LCAPI_DEBUG) - { - // error_log(__FUNCTION__ . ": invoked with:". $this->prefix.$roomid, $roomname, " . print_r($attributes, TRUE)); - } $params = ''; $this->lcapi_check_room_params($attributes); while (list ($key, $val) = each($attributes)) @@ -427,19 +405,17 @@ if ($respcode == 301) { $this->lcapi_error(LCAPI_EEXIST); - error_log(__FUNCTION__ . ": Class ($roomid, $roomname) already exist, not created"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Class ($roomid, $roomname) already exist, not created"); return false; } if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - error_log(__FUNCTION__ . ": Cannot Create Class with id : $roomid, and name : $roomname."); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Create Class with id : $roomid, and name : $roomname."); return false; } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": Class ($roomid, $roomname) created with success."); - } + + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Class ($roomid, $roomname) created with success."); return true; } /** @@ -461,13 +437,11 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - error_log(__FUNCTION__ . ": Cannot Add Role $role to userid $userid in Class with id:$roomid"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Add Role $role to userid $userid in Class with id:$roomid"); return false; } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": Role $role added for $userid in Class $roomid"); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Role $role added for $userid in Class $roomid"); return true; } /** @@ -490,13 +464,11 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - error_log(__FUNCTION__ . ": Cannot Removed Role $role from userid $this->prefix.$userid in Class with id:" . $roomid); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot Removed Role $role from userid $this->prefix.$userid in Class with id:" . $roomid); return false; } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": Role $role removed from $userid in Class $roomid"); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": Role $role removed from $userid in Class $roomid"); return true; } /** @@ -513,7 +485,7 @@ if ($respcode == 302) { $this->lcapi_error(LCAPI_ECRUD); - error_log(__FUNCTION__ . ": $roomid suppression failed"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": $roomid suppression failed"); return false; } else @@ -521,14 +493,12 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - error_log(__FUNCTION__ . ": $roomid suppression failed for an unknown reason (response: $response)"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": $roomid suppression failed for an unknown reason (response: $response)"); return false; } } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": $roomid deleted successfully."); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": $roomid deleted successfully."); return true; } /** @@ -556,13 +526,11 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_CRUD); - error_log(__FUNCTION__ . ": Room modification failed ($roomid): $response"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Room modification failed ($roomid): $response"); return false; } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . "$roomid has been modified with success"); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . "$roomid has been modified with success"); return true; } /** @@ -576,10 +544,7 @@ function lcapi_get_archives($userid, $roomid = '') { $result = $this->lcapi_get_rooms($this->prefix . $userid, $this->prefix . $roomid, 1); - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": returning archives for '$this->prefix.$userid' and '$this->prefix.$roomid': " . print_r($result, true)); - } + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning archives for '$this->prefix.$userid' and '$this->prefix.$roomid': " . print_r($result, true)); return $result; } /** @@ -603,7 +568,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_ECRUD); - error_log(__FUNCTION__ . ": List of room query failed"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": List of room query failed"); return false; } list (, $body) = explode("\n", $response, 2); @@ -631,10 +596,8 @@ $rooms[] = $room; } } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": retrieved Rooms for $userid and roomid '$roomid': " . print_r($rooms, true)); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": retrieved Rooms for $userid and roomid '$roomid': " . print_r($rooms, true)); return $rooms; } /** @@ -670,14 +633,14 @@ $response = $this->lcapi_send_query(LCAPI_FUNCTION_LIST_USER, $request); if (LCAPI_DEBUG) { - error_log(__FUNCTION__ . ": request '$request', response: $response"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": request '$request', response: $response"); } preg_match("(\d*)", $response, $matches); $respcode = $matches[0]; if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": Unable to query the server. request: '$request', response: '$response'"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Unable to query the server. request: '$request', response: '$response'"); return false; } list (, $body) = explode("\n", $response, 2); @@ -705,12 +668,11 @@ $answers[$answer[ LCAPI_ATTR_USERID]] = $answer; } } - if (LCAPI_DEBUG) { - error_log(__FUNCTION__ . ": returning answers: " . print_r($answers, true)); - } + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning answers: " . print_r($answers, true)); return $answer; } + /** * Give the role of the user on a given room * @@ -724,7 +686,9 @@ { $userid = $this->prefix . $userid; } - $params = "&attribute=" . LCAPI_ATTR_ROLEID . "&filter01=" . LCAPI_ATTR_USERID . "&filter01value=" . $userid . "&filter02=" . LCAPI_ATTR_OBJECTID . "&filter02value=" . $this->prefix . $roomid; + $params = "&attribute=" . LCAPI_ATTR_ROLEID . "&filter01=" . LCAPI_ATTR_USERID . + "&filter01value=" . $userid . "&filter02=" . LCAPI_ATTR_OBJECTID . + "&filter02value=" . $this->prefix . $roomid; $response = $this->lcapi_send_query(LCAPI_FUNCTION_LIST_ROLE, $params); preg_match("(\d*)", $response, $matches); @@ -732,7 +696,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": request '$params', response: $reponse"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": request '$params', response: $reponse"); return false; } // Some dichotomy to retreive the role name @@ -740,12 +704,11 @@ $records = explode(LCAPI_RECORD_SEPERATOR, $body); $result = explode(LCAPI_ATTR_ROLEID . "=", $records[0]); $result = explode("\n", $result[1]); - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": returning answer: " . $result[0]); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning answer: " . $result[0]); return $result[0]; } + /** * Check if the room is an archive * @@ -761,13 +724,14 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": Cannot perform query: $params, reponse: $response"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot perform query: $params, reponse: $response"); return false; } list (, $body) = explode("\n", $response, 2); $records = explode(LCAPI_RECORD_SEPARATOR, $body); return (count($records) > 1); } + /** * Give the name of the room given * @@ -783,7 +747,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": cannot retrieve the room name"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": cannot retrieve the room name"); return false; } list (, $body) = explode("\n", $response, 2); @@ -794,19 +758,15 @@ list ($key, $value) = explode("=", $line); if ($key == LCAPI_ATTR_LONGNAME) { - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": $this->prefix.$roomid's room name is $value"); - } + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": $this->prefix.$roomid's room name is $value"); return $value; } } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": did not find name of room: $roomid"); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": did not find name of room: $roomid"); return false; } + /** * Give the media type of the room given * @@ -822,7 +782,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": Cannot query the media type of $roomid"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Cannot query the media type of $roomid"); return false; } list (, $body) = explode("\n", $response, 2); @@ -833,16 +793,11 @@ list ($key, $value) = explode("=", $line); if ($key == LCAPI_ATTR_MEDIATYPE) { - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": $roomid's media type is $value"); - } + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": $roomid's media type is $value"); return $value; } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": did not find media type for $roomid"); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": did not find media type for $roomid"); return false; } } @@ -863,7 +818,7 @@ if ($respcode != 100) { // $this->lcapi_error(self::LCAPIEQRY); - error_log(__FUNCTION__ . ": cannot query room info for $roomid"); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": cannot query room info for $roomid"); return false; } list (, $body) = explode("\n", $response, 2); @@ -877,14 +832,14 @@ $roominfo[$key] = $value; } } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": returning room info for $roomid: " . print_r($roominfo, true)); - } + $room = new LCRoom(); - $room->setByRecord($roominfo, $this->prefix); + $room->setByRecord($roominfo, $this->prefix);. + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning room info for $roomid: " . print_r($roominfo, true)); return $room; } + /** * Returns status information from the server * @@ -898,7 +853,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": Query failed: " . $response); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); return false; } list (, $body) = explode("\n", $response, 2); @@ -909,12 +864,11 @@ list ($key, $value) = explode("=", $line); $answer[trim($key)] = trim($value); } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": returning server status: " . print_r($answer, true)); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server status: " . print_r($answer, true)); return $answer; } + /** * Returns the system configuration * @@ -928,7 +882,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": Query failed: " . $response); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); return false; } list (, $body) = explode("\n", $response, 2); @@ -940,12 +894,11 @@ list (, $value) = explode("=", $lines[1], 2); $answers[trim($key)] = trim($value); } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": returning server config: " . print_r($answers, true)); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server config: " . print_r($answers, true)); return $answers; } + function lcapi_get_simulcast() { $response = $this->lcapi_send_query(LCAPI_FUNCTION_LIST_SIMULCAST, ''); @@ -954,7 +907,7 @@ if ($respcode != 100) { $this->lcapi_error(LCAPI_EQRY); - error_log(__FUNCTION__ . ": Query failed: " . $response); + wimba_add_error(WIMBA_ERROR,WC,__FUNCTION__ . ": Query failed: " . $response); return false; } list (, $body) = explode("\n", $response, 2); @@ -966,10 +919,8 @@ list (, $value) = explode("=", $lines[1], 2); $answers[trim($key)] = trim($value); } - if (LCAPI_DEBUG) - { - error_log(__FUNCTION__ . ": returning server config: " . print_r($answers, true)); - } + + wimba_add_error(WIMBA_DEBUG,WC,__FUNCTION__ . ": returning server config: " . print_r($answers, true)); return $answers; } } Modified: branches/team/Thomas/integrations_common/php/vt/VtAction.php =================================================================== --- branches/team/Thomas/integrations_common/php/vt/VtAction.php 2008-02-11 21:25:53 UTC (rev 241) +++ branches/team/Thomas/integrations_common/php/vt/VtAction.php 2008-02-14 23:21:43 UTC (rev 242) @@ -31,7 +31,7 @@ { $ressource->setTitle(stripslashes($this->params["longname"])); } - + if ($this->params["led"] == "student") { $options->setFilter("false"); @@ -59,10 +59,7 @@ //create the resource on the vt server $result = voicetools_api_create_resource($ressource->getResource()); - if (VTAPI_DEBUG) - { - error_log (__FUNCTION__ ." : Board Created , rid=".$result->getRid(), TRUE); - } + return $result; } @@ -128,13 +125,14 @@ $audio = new vtAudioFormat(NULL); $options = new VtOptions(NULL); // Info - $ressource->setType("presentation"); //Voice Baord + $ressource->setType("presentation"); //Voice Presentation if (isset($this->params["description"])) { $ressource->setDescription(stripslashes($this->params["description"])); } - if (isset($this->params["longname"])) { + if (isset($this->params["longname"])) + { $ressource->setTitle(stripslashes($this->params["longname"])); } Modified: branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php =================================================================== --- branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php 2008-02-11 21:25:53 UTC (rev 241) +++ branches/team/Thomas/integrations_common/php/vt/WimbaVoicetoolsAPI.php 2008-02-14 23:21:43 UTC (rev 242) @@ -1,44 +1,39 @@ -<?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 * -* * -******************************************************************************/ +<?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: WimbaVoicetoolsAPI.php 50661 2007-06-28 20:33:11Z thomasr $ */ -error_reporting(E_ALL); +error_reporting(E_ALL); global $CFG; -//WebService Client. -require_once($CFG->libdir.'/soap/nusoap.php'); +// WebService Client. +require_once($CFG->libdir . '/soap/nusoap.php'); require_once("WimbaVoicetools.php"); - -define("VTAPI_DEBUG", false);//for the log - -/// Library of functions and constants for the voicetool API - +define("VTAPI_DEBUG", false); //for the log +// / Library of functions and constants for the voicetool API // Resources define("VT_API_VBOARD", 'board'); define("VT_API_VMAIL", 'vmail'); @@ -46,7 +41,6 @@ define("VT_API_VRECORDER", 'recorder'); define("VT_API_VPRESENTATION", 'presentation'); define("VT_API_PODCASTER", 'pc'); - // Qudio Qualities define("VT_API_QUALITY_BASIC", 'spx_8_q3'); define("VT_API_QUALITY_STANDARD", 'spx_16_q4'); @@ -55,7 +49,6 @@ // API calls define("VT_API_SERVICES", '/services/Broker?wsdl'); - define("VT_API_CREATE_RESOURCE", 'createResource'); define("VT_API_MODIFY_RESOURCE", 'modifyResource'); define("VT_API_DELETE_RESOURCE", 'deleteResource'); @@ -69,583 +62,601 @@ define("VT_API_GET_AUDIO", 'getAudio'); define("VT_API_AUDIO_EXISTS", 'audioExists'); define("VT_API_GET_VERSION", 'getVersion'); - -// Voice Tools Module Tables +// Voice Tools Module Tables define("VT_API_ACTIVITY", 'voicetools_activity'); define("VT_API_INSTANCE", 'voicetools_instance'); -set_time_limit(30); /** -* Send an SDK request to the VT server to create the resource. -* @uses CFG -* @uses VT_API_SERVICES -* @uses VT_API_CREATE_RESOURCE -* @param $resource_data - the resource to create -* @return - the object returned by the call, or false if something goes wrong -*/ -function voicetools_api_create_resource ($resource_data) { - global $CFG; + * Send an SDK request to the VT server to create the resource. + * + * @uses CFG + * @uses VT_API_SERVICES + * @uses VT_API_CREATE_RESOURCE + * @param $resource_data - the resource to create + * @return - the object returned by the call, or false if something goes wrong + */ +function voicetools_api_create_resource ($resource_data) +{ + global $CFG; + // Set the WebService URL + $soapclient = new soap_client($CFG->voicetools_servername . VT_API_SERVICES, true); + $err = $soapclient->getError(); + if ($err) + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + return null; + } + // Set the parameters to send to the WebService + $resourceArray = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $resource_data); + // Call the WebService and store its result in $result. + $result = $soapclient->call(VT_API_CREATE_RESOURCE, $resourceArray); - // Set the WebService URL - $soapclient = new soap_client($CFG->voicetools_servername.VT_API_SERVICES,true); - $err = $soapclient->getError(); - if ($err) - { - error_log (__FUNCTION__ .' : Error to create the soap element : ' .$err, TRUE); - return NULL; - } - // Set the parameters to send to the WebService - $resourceArray = array ($CFG->voicetools_adminusername,$CFG->voicetools_adminpassword,$resource_data); + if ($soapclient->fault) + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + return null; + } + else + { + // Check for errors + $err = $soapclient->getError(); + if ($err) + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + return null; + } + } + $resource = new vtResource($result); - // Call the WebService and store its result in $result. - $result = $soapclient->call(VT_API_CREATE_RESOURCE, $resourceArray); + if ($resource->error == "error") + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Resource not created because " . $resource->error_message); + } + + wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Resource Created"); + return $resource; +} - if ($soapclient->fault) { - error_log (__FUNCTION__ .' : Fault with the web service : ' . $soapclient->fault , TRUE); - return NULL; - } - else - { - // Check for errors +/** + * Send an SDK request to the VT server to create the resource. + * + * @uses CFG + * @uses VT_API_SERVICES + * @uses VT_API_MODIFY_RESOURCE + * @param $resource_data - the resource to create + * @return - the object returned by the call, or false if something goes wrong + */ +function voicetools_api_modify_resource ($resource_data) +{ + global $CFG; + + $soapclient = new soap_client($CFG->voicetools_servername . VT_API_SERVICES, true); $err = $soapclient->getError(); if ($err) { - // Display the error - error_log (__FUNCTION__ .' : error with the web service : ' . $err , TRUE); - return NULL; - } - } - $resource=new vtResource($result); + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + return null; + } + $resourceArray = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $resource_data); - if($resource->error=="error") - { - error_log (__FUNCTION__ ." : Resource not created because ".$resource->error_message, TRUE); - - } - if(VTAPI_DEBUG) - { - error_log (__FUNCTION__ ." : Resource Created", TRUE); - } - return $resource; -} + $result = $soapclient->call(VT_API_MODIFY_RESOURCE, $resourceArray); -/** -* Send an SDK request to the VT server to create the resource. -* @uses CFG -* @uses VT_API_SERVICES -* @uses VT_API_MODIFY_RESOURCE -* @param $resource_data - the resource to create -* @return - the object returned by the call, or false if something goes wrong -*/ -function voicetools_api_modify_resource ($resource_data) { - global $CFG; + if ($soapclient->fault) + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + return null; + } + else + { + // Check for errors + $err = $soapclient->getError(); + if ($err) { + // Display the error + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + return null; + } + } - $soapclient = new soap_client($CFG->voicetools_servername.VT_API_SERVICES,true); - $err = $soapclient->getError(); - if ($err) - { - error_log (__FUNCTION__ .' : Error to create the soap element : ' .$err, TRUE); - return NULL; - } - $resourceArray = array ($CFG->voicetools_adminusername,$CFG->voicetools_adminpassword,$resource_data); + $resource = new vtResource($result); - $result = $soapclient->call(VT_API_MODIFY_RESOURCE, $resourceArray); + if ($resource->error == "error") + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Resource not modified because " . $resource->error_message); + return null; + } + + wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Resource Modified"); + return $resource; +} - if ($soapclient->fault) { - error_log (__FUNCTION__ .' : Fault with the web service : ' . $soapclient->fault , TRUE); - return NULL; - } - else - { - // Check for errors +// To CHECK !!! +function voicetools_api_message_exists ($rid, $mid) +{ + global $CFG; + + $soapclient = new soap_client($CFG->voicetools_servername . VT_API_SERVICES, true); $err = $soapclient->getError(); if ($err) { - // Display the error - error_log (__FUNCTION__ .' : error with the web service : ' . $err , TRUE); - return NULL; - } - } + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + return null; + } + $resource = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $rid, $mid); - $resource=new vtResource($result); + $result = $soapclient->call(VT_API_MESSAGE_EXISTS, $resource); - if($resource->error=="error") - { - error_log (__FUNCTION__ ." : Resource not modified because ".$resource->error_message, TRUE); - return NULL; - } - if(VTAPI_DEBUG) - { - error_log (__FUNCTION__ ." : Resource Modified", TRUE); - } - return $resource; -} + if ($soapclient->fault) + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + return null; + } + else + { + // Check for errors + $err = $soapclient->getError(); + if ($err) + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + return null; + } + } -// To CHECK !!! -function voicetools_api_message_exists ($rid, $mid) { + $res = false; + foreach ($result['values'] as $item) + { + if ($item['name'] == 'exists') + { + $res = $item['value']; + } + } + return $res; +} - global $CFG; +/** + * Send an SDK request to the VT server to delete a resource. + * + * @uses CFG + * @uses VT_API_SERVICES + * @uses VT_API_DELETE_RESOURCE + * @param $rid - the rid of the resource to delete + * @return - the object returned by the call, or false if something goes wrong + */ +function voicetools_api_delete_resource ($rid) +{ + global $CFG; - $soapclient = new soap_client($CFG->voicetools_servername.VT_API_SERVICES,true); - $err = $soapclient->getError(); - if ($err) - { - error_log (__FUNCTION__ .' : Error to create the soap element : ' .$err, TRUE); - return NULL; - } - $resource = array ($CFG->voicetools_adminusername,$CFG->voicetools_adminpassword,$rid,$mid); - - - $result = $soapclient->call(VT_API_MESSAGE_EXISTS, $resource); - - if ($soapclient->fault) { - error_log (__FUNCTION__ .' : Fault with the web service : ' . $soapclient->fault , TRUE); - return NULL; - } - else - { - // Check for errors + $soapclient = new soap_client($CFG->voicetools_servername . VT_API_SERVICES, true); $err = $soapclient->getError(); if ($err) { - // Display the error - error_log (__FUNCTION__ .' : error with the web service : ' . $err , TRUE); - return NULL; - } - } + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Error to create the soap element : ' . $err); + return null; + } + $resource = array ($CFG->voicetools_adminusername, $CFG->voicetools_adminpassword, $rid); - $res=false; - foreach ($result['values'] as $item) - { - if ($item['name'] == 'exists') + $result = $soapclient->call(VT_API_DELETE_RESOURCE, $resource); + + if ($soapclient->fault) { - $res = $item['value']; - } - } - return $res; - //return $result; -} + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : Fault with the web service : ' . $soapclient->fault); + return null; + } + else + { + // Check for errors + $err = $soapclient->getError(); + if ($err) + { + // Display the error + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . ' : error with the web service : ' . $err); + return null; + } + } -/** -* Send an SDK request to the VT server to delete a resource. -* @uses CFG -* @uses VT_API_SERVICES -* @uses VT_API_DELETE_RESOURCE -* @param $rid - the rid of the resource to delete -* @return - the object returned by the call, or false if something goes wrong -*/ -function voicetools_api_delete_resource ($rid) { - global $CFG; + $resource = new vtResource($result); - $soapclient = new soap_client($CFG->voicetools_servername.VT_API_SERVICES,true); - $err = $soapclient->getError(); - if ($err) - { - error_log (__FUNCTION__ .' : Error to create the soap element : ' .$err, TRUE); - return NULL; - } - $resource = array ($CFG->voicetools_adminusername,$CFG->voicetools_adminpassword,$rid); + if ($resource->error == "error") + { + wimba_add_log (WIMBA_ERROR, WV, __FUNCTION__ . " : Resource not deleted because " . $resource->error_message); + } - $result = $soapclient->call(VT_API_DELETE_RESOURCE, $resource); + wimba_add_log (WIMBA_DEBUG, WV, __FUNCTION__ . " : Resource Deleted"); + return $resource; +} - if ($soapclient->fault) { - error_log (__FUNCTION__ .' : Fault with the web service : ' . $soapclient->fault , TRUE); - return NULL; - } - else - { - // Check for errors +/** + * Send an SDK request to the VT server to test if the resource exist. + * + * @uses CFG + * @uses VT_API_SERVICES + * @uses VT_API_RESOURCE_EXISTS + * @param $rid - the rid of the resource to find + * @return - a boolean. true if the resource exist, false elsewhere. + */ +function voicetools_api_resource_exists ($rid) +{ + global $CFG; + + $soapclient = new soap_client($CFG->voicetools_servername . VT_API_SERVICES, true); $err = $soa... [truncated message content] |