[Hw4mdl-svn] SF.net SVN: hw4mdl: [55] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
From: <sh...@us...> - 2006-08-30 12:29:15
|
Revision: 55 Author: shazan Date: 2006-08-30 05:29:03 -0700 (Wed, 30 Aug 2006) ViewCVS: http://svn.sourceforge.net/hw4mdl/?rev=55&view=rev Log Message: ----------- Modified Paths: -------------- trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/view.php Removed Paths: ------------- trunk/moodle/mod/liveclassroom/DbException.php trunk/moodle/mod/liveclassroom/LCHttpException.php Deleted: trunk/moodle/mod/liveclassroom/DbException.php =================================================================== --- trunk/moodle/mod/liveclassroom/DbException.php 2006-08-29 15:37:17 UTC (rev 54) +++ trunk/moodle/mod/liveclassroom/DbException.php 2006-08-30 12:29:03 UTC (rev 55) @@ -1,70 +0,0 @@ -<?PHP -/****************************************************************************** - * * - * Copyright (c) 2004-2005 Horizon Wimba Inc., All Rights Reserved. * - * * - * COPYRIGHT: * - * This software is the property of Horizon Wimba Inc. * - * It cannot be copied, used, or modified without obtaining an * - * authorization from the authors or a mandated member of * - * Horizon Wimba Inc. * - * If such an authorization is provided, any modified version * - * or copy of the software has to contain this header. * - * * - * WARRANTIES: * - * This software is made available by the authors in the hope * - * that it will be useful, but without any warranty. * - * Horizon Wimba Inc. is not liable for any consequence related * - * to the use of the provided software. * - * * - * Class: DbException.php * - * * - * Author: * - * * - * Date: 2006 * - * * - ******************************************************************************/ - -class DbException extends Exception { - - public function __construct($message) { - - parent::__construct($message); - } - - - /** - * Builds a Live Classroom HTTP Exception. - * @param message the detail message. - * @param cause the cause (null if there is no cause). - */ - public function DbException($message, $cause) - { - super($message, $cause); - } - - - - public function __toString() { - return __CLASS__ . ": {$this->message}\n"; - } - - /** - * return the error message - */ - public function getError() { - - $return .= '<strong>Message : ' . $this->getMessage() . '</strong><br/>'; - - return $return; - } - -} - - - - - -?> - - Deleted: trunk/moodle/mod/liveclassroom/LCHttpException.php =================================================================== --- trunk/moodle/mod/liveclassroom/LCHttpException.php 2006-08-29 15:37:17 UTC (rev 54) +++ trunk/moodle/mod/liveclassroom/LCHttpException.php 2006-08-30 12:29:03 UTC (rev 55) @@ -1,72 +0,0 @@ -<?PHP -/****************************************************************************** - * * - * Copyright (c) 2004-2005 Horizon Wimba Inc., All Rights Reserved. * - * * - * COPYRIGHT: * - * This software is the property of Horizon Wimba Inc. * - * It cannot be copied, used, or modified without obtaining an * - * authorization from the authors or a mandated member of * - * Horizon Wimba Inc. * - * If such an authorization is provided, any modified version * - * or copy of the software has to contain this header. * - * * - * WARRANTIES: * - * This software is made available by the authors in the hope * - * that it will be useful, but without any warranty. * - * Horizon Wimba Inc. is not liable for any consequence related * - * to the use of the provided software. * - * * - * Class: LCHttpException.php * - * * - * Author: * - * * - * Date: 2006 * - * * - ******************************************************************************/ - - - -class LCHttpException extends Exception { - - public function __construct($message) { - - parent::__construct($message); - } - - - /** - * Builds a Live Classroom HTTP Exception. - * @param message the detail message. - * @param cause the cause (null if there is no cause). - */ - public function LCHttpException($message, $cause) - { - super($message, $cause); - } - - - - public function __toString() { - return __CLASS__ . ": {$this->message}\n"; - } - - /** - * return the error message - */ - public function getError() { - - $return .= '<strong>Message : ' . $this->getMessage() . '</strong><br/>'; - - return $return; - } - -} - - - - - -?> - - Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-08-29 15:37:17 UTC (rev 54) +++ trunk/moodle/mod/liveclassroom/api.php 2006-08-30 12:29:03 UTC (rev 55) @@ -421,7 +421,6 @@ global $CFG; global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST; - $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&target=$roomid&longname=$roomname"); @@ -449,7 +448,6 @@ return false; } return $list; - } @@ -466,31 +464,17 @@ global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST; - $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&filter00=longname&filter00value=$roomname"); - //print $data; preg_match("(\d*)", $data, $matches); $respcode = $matches[0]; if ( $respcode != 100) { return false; } - // print($data); + $tok = split("100 OK",$data); - //print $tok[1]; $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - // print $tok1[1]; - //print (liveclassroom_parse_line($tok1[1],"class_id=")); - - /* - - for($i=0;$i<sizeof($tok1);$i++) { - //print $tok1[$i]."<br>" ; - print (liveclassroom_parse_line($tok1[$i],"class_id="))."<br>"; - } -*/ -// print (liveclassroom_api_get_roomid($roomname))."<br>"; if(sizeof($tok1)>1){ @@ -558,7 +542,6 @@ function liveclassroom_parse_line($line,$pattern) { $response = split($pattern,$line); - //print $response; return $response[1]; } @@ -574,33 +557,22 @@ global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST; - $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&filter00=longname&filter00value=$roomname"); - - //print $data; + $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_GET_ROOM_LIST,"&filter00=longname&filter00value=$roomname"); + preg_match("(\d*)", $data, $matches); $respcode = $matches[0]; if ( $respcode != 100) { return false; } - // print($data); $tok = split("100 OK",$data); - //print $tok[1]; $tok1 = split($LIVECLASSROOM_API_RECORD_SEPERATOR,$tok[1]); - // print $tok1[1]; $result = liveclassroom_parse_line($tok1[0],"class_id="); - // return $result; - + //Remove le " " at the end of the line $response = substr($result,0,-1); - // print $response."<br>"; return $response; - - //$response = split(" ",$result); - //print $response; - /* $response = trim($result," "); - return $response;*/ } /** @@ -680,7 +652,7 @@ * * @param userid * @param groupid - */ + *//* function liveclassroom_api_add_user_in_group($userid, $groupid) { global $CFG; @@ -696,14 +668,14 @@ return true; -} +}*/ /** * Remove the given user from the group. * * @param userif * @param groupif - */ + *//* function liveclassroom_api_remove_user_from_group($userid, $groupid) { global $CFG; global $LIVECLASSROOM_API_ADMIN; @@ -718,15 +690,42 @@ return true; -} +}*/ + +/* +* Modify the settings of a room +* @param $roomid : the id of the room +* +* IMPLEMENT ME !!! +*/ function liveclassroom_api_modify_room($roomid) { global $CFG; global $LIVECLASSROOM_API_ADMIN; global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM; - $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$groupid&delete_user=$user"); + $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&target=$roomid"); + + } +/* +* archive=1 ===> room is an archive +* +* IMPLEMENT ME !!! +*/ +function liveclassroom_api_get_archive_list($roomid,$userid,$role) { + global $CFG; + global $LIVECLASSROOM_API_ADMIN; + global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM; + + $data = liveclassroom_api_send_query($ch,$LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM, "&filter00=archive&filter00value=1"); + + + +} + + + ?> Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-08-29 15:37:17 UTC (rev 54) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-08-30 12:29:03 UTC (rev 55) @@ -239,15 +239,7 @@ liveclassroom_create_room ($course->id, $name); } else { //Room already exist - //Create in the moodle database - /* $type = liveclassroom_get_type($liveclassroom); - //create the liveclassroom_rooms in moodle database - $liveclassroom_rooms->course = $liveclassroom->course; - $liveclassroom_rooms->name = liveclassroom_get_room_name($course,$type); - $liveclassroom_rooms->lc_id = $liveclassroom->id; - if(!liveclassroom_rooms_add_instance($liveclassroom_rooms)) { - return false; - }*/ + } } Modified: trunk/moodle/mod/liveclassroom/view.php =================================================================== --- trunk/moodle/mod/liveclassroom/view.php 2006-08-29 15:37:17 UTC (rev 54) +++ trunk/moodle/mod/liveclassroom/view.php 2006-08-30 12:29:03 UTC (rev 55) @@ -95,8 +95,8 @@ } } -//probleme !! + // Create the session fir this user if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) { error ("Cannot create session"); @@ -104,6 +104,7 @@ + /// Print the page header if ($course->category) { @@ -118,6 +119,26 @@ "", "", true, update_module_button($cm->id, $course->id, $strliveclassroom), navmenu($course, $cm)); + +/* GROUP LATER !!!!!!!!!!!!! + +/// Check to see if groups are being used here + if ($groupmode = groupmode($course, $cm)) { // Groups are being used + $currentgroup = setup_and_print_groups($course, $groupmode, "view.php?id=$cm->id"); + } else { + $currentgroup = 0; + } + + if ($currentgroup) { + $groupselect = " AND groupid = '$currentgroup'"; + $groupparam = "&groupid=$currentgroup"; + } else { + $groupselect = ""; + $groupparam = ""; + } + +*/ + /// Print the main part of the page ?> <!--script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch-7892.js'></script--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |