Revision: 232
http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=232&view=rev
Author: trollinger
Date: 2008-01-22 15:54:15 -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/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/view.php
branches/team/Thomas/moodle/mod/liveclassroom/welcome.php
Modified: branches/team/Thomas/moodle/mod/liveclassroom/doAction.php
===================================================================
--- branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/doAction.php 2008-01-22 23:54:15 UTC (rev 232)
@@ -30,7 +30,7 @@
/* $Id: doAction.php 55986 2007-11-13 21:51:00Z thomasr $ */
/* This page manage the action create, update, delete for a room */
-error_reporting(E_ERROR);
+global $CFG;
require_once ("../../config.php");
require_once ("lib.php");
require_once ("lib/php/lc/LCAction.php");
@@ -51,7 +51,7 @@
$params[$param["value"]] = $value;
}
-$courseid = $params["enc_courseId"];
+$courseid = $params["enc_course_id"];
require_login($courseid);
$action = required_param('action', PARAM_ALPHA);
@@ -66,7 +66,7 @@
switch ($action) {
case "launch" :
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
if ($params["studentView"] == "true") {
$authToken = $api->getAuthokenNormal($session->getCourseId() . "_S", $session->getFirstname(), $session->getLastname());
@@ -77,23 +77,23 @@
exit;
break;
case "create" :
- $id = $api->createRoom(required_param('id', PARAM_SAFEDIR), "false");
+ $id = $api->createRoom(required_param('resource_id', PARAM_SAFEDIR), "false");
$messageAction = "created";
$messageProduct = "room";
break;
case "update" :
- $roomId = required_param('id', PARAM_SAFEDIR);
-
+ $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('id', PARAM_SAFEDIR), $api->getPrefix());
+ $roomId = trimPrefix(required_param('resource_id', PARAM_SAFEDIR), $api->getPrefix());
else
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
$id = $api->deleteRoom($roomId);
//delte the activity linked to this room
@@ -104,31 +104,31 @@
$messageProduct = "room";
break;
case "openContent" :
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
$authToken = $api->getAuthoken();
header('Location:' . $CFG->liveclassroom_servername . '/admin/class/carousels.epl?class_id=' . $roomId . '&hzA=' . $authToken . '&no_sidebar=1');
exit ();
break;
case "openReport" :
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
$authToken = $api->getAuthoken();
header('Location:reports.php?id=' . $roomId . '&hzA=' . $authToken);
exit ();
break;
case "openAdvancedMedia" :
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
$authToken = $api->getAuthoken();
header('Location:' . $CFG->liveclassroom_servername . '/admin/class/media.pl?class_id=' . $roomId . '&hzA=' . $authToken . '&no_sidebar=1');
exit ();
break;
case "openAdvancedRoom" :
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
$authToken = $api->getAuthoken();
header('Location:' . $CFG->liveclassroom_servername . '/admin/class/properties.pl?class_id=' . $roomId . '&hzA=' . $authToken . '&no_sidebar=1');
exit ();
break;
case "getDialInformation" :
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
$select_room = $api->getRoom($roomId);
if ($params["studentView"] == "true" || $session->isInstructor() == false)
@@ -139,9 +139,9 @@
break;
case "saveSettings" :
if ($api->getPrefix() != "")
- $roomId = trimPrefix(required_param('id', PARAM_SAFEDIR), $api->getPrefix());
+ $roomId = trimPrefix(required_param('resource_id', PARAM_SAFEDIR), $api->getPrefix());
else
- $roomId = required_param('id', PARAM_SAFEDIR);
+ $roomId = required_param('resource_id', PARAM_SAFEDIR);
$id = $api->createRoom($roomId, "true");
break;
}
@@ -161,6 +161,6 @@
header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&messageAction=' . $messageAction . '&messageProduct=' . $messageProduct);
}
} else {
-// header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&error=session');
+ header('Location: welcome.php?id=' . $session->getCourseId() . '&' . $session->url_params . '&time=' . $session->timeOfLoad . '&error=session');
}
?>
\ No newline at end of file
Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php
===================================================================
--- branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/generateListRooms.php 2008-01-22 23:54:15 UTC (rev 232)
@@ -31,7 +31,6 @@
/// This page is to generate the list of rooms and archives
-error_reporting(E_ERROR);
require_once("../../config.php");
require_once("lib.php");
require_once("lib/php/lc/LCAction.php");
@@ -49,11 +48,11 @@
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"]);
if(isset($params["error"])){
@@ -62,17 +61,21 @@
else
{
- $session=new WimbaMoodleSession($params);
+ $session=new WimbaMoodleSession($params);
+
if(isset($params["messageProduct"]) && isset($params["messageAction"]))
$message=get_string("message_" . $params["messageProduct"] . "_start", "liveclassroom")." ".$params["messageProductName"]." ".get_string("message_" . $params["messageAction"] . "_end","liveclassroom");
$api=new LCAction($session,$CFG->liveclassroom_servername,
$CFG->liveclassroom_adminusername,
$CFG->liveclassroom_adminpassword,$CFG->dataroot);
-
+
$uiManager=new WimbaUI($session,$api);
if($session->error==false)//good
{
+
+
$display=$uiManager->getLCPrincipalView($message);
+
}
else{
if($session->error=="session")
@@ -81,5 +84,6 @@
$display=$uiManager->setError(get_string ('error_signature', 'liveclassroon'));
}
}
+
echo $display;
?>
Modified: branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php
===================================================================
--- branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/generateSettings.php 2008-01-22 23:54:15 UTC (rev 232)
@@ -27,8 +27,7 @@
******************************************************************************/
/* $Id: generateSettings.php 197 2007-08-29 14:30:36Z trollinger $ */
-/// This page is to generate the settings of a room or archive
-error_reporting(E_ERROR);
+
require_once("../../config.php");
require_once("lib.php");
require_once("lib/php/lc/LCAction.php");
@@ -48,7 +47,7 @@
$params[$param["value"]] = $value;
}
-require_login($params["enc_courseId"]);
+require_login($params["enc_course_id"]);
$action = optional_param('action', PARAM_ALPHA);
$currentIdtab = optional_param('idtab', null, PARAM_ALPHA);
@@ -59,12 +58,13 @@
$api=new LCAction($session,$CFG->liveclassroom_servername,
$CFG->liveclassroom_adminusername,
$CFG->liveclassroom_adminpassword,$CFG->dataroot);
- $roomId = required_param('id', PARAM_SAFEDIR );
+ $roomId = required_param('resource_id', PARAM_SAFEDIR );
$room_info = $api->getRoom($roomId);
if($room_info!=false){
-
+
$uiManager=new WimbaUI($session,$api,$currentIdtab);
+
$uiManager->setCurrentProduct("liveclassroom",$room_info);
}
else {
@@ -81,12 +81,13 @@
$uiManager=new WimbaUI($session,$api);
$uiManager->setCurrentProduct("liveclassroom");
}
-
+
if(isset($params["createWorkflow"]) && $params["createWorkflow"]=="true")
$createWorkflow= "true";
else
$createWorkflow="false";
$display=$uiManager->getLCSettingsView($action,$createWorkflow);
+
}
else
{
Modified: branches/team/Thomas/moodle/mod/liveclassroom/index.php
===================================================================
--- branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/index.php 2008-01-22 23:54:15 UTC (rev 232)
@@ -30,7 +30,7 @@
/// This page lists all the instances of liveclassroom in a particular course
-error_reporting(E_ERROR);
+
require_once("../../config.php");
require_once("lib.php");
Modified: branches/team/Thomas/moodle/mod/liveclassroom/lib.php
===================================================================
--- branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/lib.php 2008-01-22 23:54:15 UTC (rev 232)
@@ -35,8 +35,11 @@
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");
$LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs
@@ -122,8 +125,8 @@
liveclassroom_deleteCalendarEvent($result);
}
-
- return $result;
+ wimba_add_log(1,"ssss");
+ return true;
}
@@ -462,4 +465,22 @@
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-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/mod.html 2008-01-22 23:54:15 UTC (rev 232)
@@ -29,12 +29,12 @@
******************************************************************************/
/* $Id: mod.html 200 2008-01-09 11:37:50Z trollinger $ */
-error_reporting(E_ERROR);
+
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');
-include_once($CFG->dirroot.'/mod/liveclassroom/lib/php/common/WimbaLib.php');
+
require_once($CFG->dirroot.'/version.php');
//test if the current user can see this page
@@ -47,7 +47,7 @@
$id = optional_param('id', 0, PARAM_INT);
$roomId = optional_param('roomId',null, PARAM_RAW);
$update = optional_param('update', null, PARAM_INT);
-$sectionId = optional_param('section', null, PARAM_INT);
+$sectionId = optional_param('section', 0, PARAM_INT);
$lcApi=new LCAction(null,$CFG->liveclassroom_servername,
$CFG->liveclassroom_adminusername,
@@ -69,7 +69,13 @@
if (!isset($form->section)) {
$form->section = '';
}
-
+ if (empty($form->timeopen)) {
+ $form->timeopen = "";
+ $form->timerestrict = 0;
+ } else {
+ $form->timerestrict = 1;
+ }
+
$event=false;
$description="";
$stringDate="";
Modified: branches/team/Thomas/moodle/mod/liveclassroom/view.php
===================================================================
--- branches/team/Thomas/moodle/mod/liveclassroom/view.php 2008-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/view.php 2008-01-22 23:54:15 UTC (rev 232)
@@ -132,7 +132,7 @@
<tbody>
<tr>
<td align=left>
- <img src="pictures/items/headerbar-logo.png" height="32" width="80">
+ <img src="lib/web/pictures/items/headerbar-logo.png" height="32" width="80">
</td>
</tr>
</tbody>
@@ -177,7 +177,7 @@
<table width=100% >
<tr style="border-top:1px solid; background-color:#F0F0F0;">
<td align=left >
- <img src="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/pictures/items/listitem-liveclassroomicon.gif" /><a class="list" href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $cm->course;?>">
+ <img src="lib/web/pictures/items/listitem-liveclassroomicon.gif" /><a class="list" href="<?php echo $CFG->wwwroot;?>/mod/liveclassroom/index.php?id=<?php echo $cm->course;?>">
<?php
if(getRoleForWimbaTools($course->id, $USER->id)=="Instructor")
Modified: branches/team/Thomas/moodle/mod/liveclassroom/welcome.php
===================================================================
--- branches/team/Thomas/moodle/mod/liveclassroom/welcome.php 2008-01-22 23:00:11 UTC (rev 231)
+++ branches/team/Thomas/moodle/mod/liveclassroom/welcome.php 2008-01-22 23:54:15 UTC (rev 232)
@@ -28,7 +28,7 @@
******************************************************************************/
/* $Id: welcome.php 197 2007-08-29 14:30:36Z trollinger $ */
-error_reporting(E_ERROR);
+
require_once("../../config.php");
require_once("lib.php");
global $CFG;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|