Revision: 233
http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=233&view=rev
Author: trollinger
Date: 2008-01-22 15:54:29 -0800 (Tue, 22 Jan 2008)
Log Message:
-----------
Update some stuff related to the changes done in the common library for vt
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/lc/LCAction.php
Modified: branches/team/Thomas/integrations_common/php/common/WimbaLib.php
===================================================================
--- branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-01-22 23:54:15 UTC (rev 232)
+++ branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-01-22 23:54:29 UTC (rev 233)
@@ -1,4 +1,7 @@
<?php
+
+
+
/**
* Returns the keys of the general parameters passed by GET or POST
*/
@@ -380,4 +383,51 @@
}
+define('PRONTO_INFO', 'info');
+define('PRONTO_WARN', 'warn');
+define('PRONTO_ERROR', 'error');
+define('PRONTO_DEBUG', 'debug');
+
+/**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/pronto/logs/LEVEL
+ */
+function wimba_add_log($level,$message){
+
+//Set the log level values.
+$level_values = array(
+ WIMBA_DEBUG => 1,
+ WIMBA_INFO => 2,
+ WIMBA_WARN => 3,
+ WIMBA_ERROR => 4
+);
+ global $CFG;
+
+//Write on the logs only if the configured level allows it.
+ //if ($level_values[$level] >= intval(1)){
+
+ // 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(PRODUCT_DIR, 0700);
+
+ @mkdir(WIMBA_LOGS_DIR, 0700);
+
+ //Computes the log filename. Space characters are replaced by unerscore, to have a correct filename.
+ $file = WIMBA_LOGS_DIR."/".str_replace(' ','_',$site->shortname)."-".$today_timestamp."-pronto.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)." pronto - ".$message."\n");
+ @fclose($fh);
+ //}
+}
+
+
?>
Modified: branches/team/Thomas/integrations_common/php/common/WimbaUI.php
===================================================================
--- branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-01-22 23:54:15 UTC (rev 232)
+++ branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-01-22 23:54:29 UTC (rev 233)
@@ -89,7 +89,8 @@
/********
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["courseId"], $this->session->signature, "", "", "", "");
+ $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
*********/
@@ -117,6 +118,7 @@
}else{
$this->xml->addSpaceElement("300px", "instructor");
}
+
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari'))
$this->xml->addSearchElement("all", "Safari");
else
@@ -129,7 +131,7 @@
if (isset ($message) && $message!="") {
$this->xml->addMessage($message);
}
-
+
$rooms=$this->getListLiveClassroom();
if($rooms!=false || $rooms==null)
@@ -277,7 +279,7 @@
/********
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["courseId"], $this->session->signature, "", "", $CFG->voicetools_servername, "");
+ $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, "", "", $CFG->voicetools_servername, "");
/********
HEADER
*********/
@@ -301,9 +303,11 @@
$this->createLcFeaturesPanel();
$this->createLcChatPanel();
$this->createLcAccessPanel();
+
if ($update == "update" && $this->currentObject != null && !$this->currentObject->isArchive()) {
$this->createLcAdvancedPanel();
}
+
$this->xml->createValidationButtonElement(get_string("validationElement_ok", "liveclassroom"), "actionHide", "javascript:launchAjaxRequest('generateListRooms.php','',true,'all')", "advanced_Ok");
if ($createWorkflow == "true")
@@ -316,6 +320,7 @@
else {
$this->xml->createValidationButtonElement(get_string("validationElement_saveAll", "liveclassroom"), "action", "javascript:submitForm('doAction.php','update','".$this->currentObject->getRoomId()."')", "setting_Save");
}
+
return $this->xml->getXml();
}
@@ -395,7 +400,7 @@
**/
function getListLiveClassroom() {
- $rooms = $this->api->getRooms($this->session->getcourse_id() . "_T");
+ $rooms = $this->api->getRooms($this->session->getcourseId() . "_T");
if($rooms==false){
return false;
@@ -542,7 +547,7 @@
);
if($this->disabled!="")
$parameters["disabled"] = $this->disabled;
- if ($this->currentObject == null || $this->api->isStudentAdmin($this->currentObject->getRoomId(), $this->session->getcourse_id() . "_S") == "false")
+ if ($this->currentObject == null || $this->api->isStudentAdmin($this->currentObject->getRoomId(), $this->session->getcourseId() . "_S") == "false")
$parameters["checked"] = "true";
$this->xml->addInputElement("input", $parameters);
$parameters = array (
Modified: branches/team/Thomas/integrations_common/php/lc/LCAction.php
===================================================================
--- branches/team/Thomas/integrations_common/php/lc/LCAction.php 2008-01-22 23:54:15 UTC (rev 232)
+++ branches/team/Thomas/integrations_common/php/lc/LCAction.php 2008-01-22 23:54:29 UTC (rev 233)
@@ -19,6 +19,7 @@
var $prefix="";
function LCAction($session, $server, $login, $password, $path, $courseId = "") {
+
$this->session = $session;
$this->api = LCApi :: getInstance($server, $login, $password, $path);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|