[Hw4mdl-svn] SF.net SVN: hw4mdl: [106] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
From: <sh...@us...> - 2006-12-07 16:08:31
|
Revision: 106 http://svn.sourceforge.net/hw4mdl/?rev=106&view=rev Author: shazan Date: 2006-12-07 08:08:14 -0800 (Thu, 07 Dec 2006) Log Message: ----------- add url encoding anf logs popup displaying Modified Paths: -------------- trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/logs.php Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-12-07 10:41:11 UTC (rev 105) +++ trunk/moodle/mod/liveclassroom/api.php 2006-12-07 16:08:14 UTC (rev 106) @@ -65,8 +65,8 @@ $LIVECLASSROOM_API_RECORD_SEPERATOR = "=END RECORD"; +$LIVECLASSROOM_LOGS = "logs.php"; - /** * Creates a CURL session with the Live Classroom server. Upon success, it * returns a CURL Handle authenticated and ready for use. It returns false @@ -85,7 +85,9 @@ global $CFG; global $LIVECLASSROOM_API_ADMIN; global $LIVECLASSROOM_API_FUNCTION_NOOP; - + global $LIVECLASSROOM_LOGS; + global $COURSE; + if (empty($servername)) { // feed them with $CFG $servername = $CFG->liveclassroom_servername; $login = $CFG->liveclassroom_adminusername; @@ -115,7 +117,7 @@ $data = curl_exec($ch); if (curl_errno($ch)) { - add_to_log("", "liveclassroom", "URL", "", "URL incorrect"); + add_to_log($COURSE->id, "liveclassroom", "URL", "$LIVECLASSROOM_LOGS?type=errorUrlUnavailable&time=".time()."&courseId=".$COURSE->id, "URL incorrect"); // print curl_error($ch); return false; } @@ -124,12 +126,12 @@ if ( $resp_code != 100 && $resp_code != 301) { //error( "Response: Authentication Failed: $resp_code"); - add_to_log("", "liveclassroom", "Authentication", "", "Authentication Failed: $resp_code"); + add_to_log($COURSE->id, "liveclassroom", "Authentication", "$LIVECLASSROOM_LOGS?type=errorAuthentication&time=".time()."&respcode=$resp_code&courseId=".$COURSE->id, "Authentication Failed"); return false; } curl_close($ch); //fclose($cook); - add_to_log("", "liveclassroom", "Authentication", "", "Authentication succeeded"); + add_to_log($COURSE->id, "liveclassroom", "Authentication", "$LIVECLASSROOM_LOGS?type=authentication&time=".time()."&courseId=".$COURSE->id, "Authentication succeeded"); return $ch; } @@ -165,10 +167,12 @@ } } + $enc_list = str_replace(" ", "+", $attribute); + $url = $CFG->liveclassroom_servername. $LIVECLASSROOM_API_ADMIN. $const. - $attribute; + $enc_list; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); @@ -207,6 +211,8 @@ global $LIVECLASSROOM_API_ADMIN; global $LIVECLASSROOM_API_FUNCTION_CREATE_USER; global $LIVECLASSROOM_MOODLE_PREFIX; + global $LIVECLASSROOM_LOGS; + global $COURSE; $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_USER, "&target=$userid&first_name=$rolename&last_name=$coursename"); @@ -221,11 +227,11 @@ if ( $respcode != 100 && $respcode != 301) { - add_to_log("", "liveclassroom", "Create User", "", "$userId Creation Failed"); + add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=errorCreateUser&time=".time()."&userId=$userId&respcode=$respcode&courseId=".$COURSE->id, "User Creation Failed"); // error( "Response: Account ($userId) Creation Failed: $resp_code"); return false; } - add_to_log("", "liveclassroom", "Create User", "", "$userId Creation succeeded"); + add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=createUser&time=".time()."&userId=$userId&courseId=".$COURSE->id, "User Creation succeeded"); return true; } @@ -272,16 +278,17 @@ global $USER; global $LIVECLASSROOM_API_ADMIN; global $LIVECLASSROOM_API_FUNCTION_GET_TOKEN; - + global $LIVECLASSROOM_LOGS; + global $COURSE; + $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_GET_TOKEN, "&target=$userid&nickname=$nickname"); - preg_match("(\d*)", $data, $matches); $respcode = $matches[0]; if ( $respcode != 100) { - add_to_log("", "liveclassroom", "Create Session", "", "Cannot Create Session : $resp_code"); + add_to_log($COURSE->id, "liveclassroom", "Create Session", "$LIVECLASSROOM_LOGS?type=errorCreateSession&time=".time()."&respcode=$respcode&nickname=$nickname&courseId=".$COURSE->id, "Cannot Create Session."); return false; } @@ -305,7 +312,7 @@ //error ("Token empty, data=<pre>$data</pre>"); return false; } - add_to_log("", "liveclassroom", "", "create session", "Creating Session for $nickname"); + add_to_log($COURSE->id, "liveclassroom", "Create Session", "$LIVECLASSROOM_LOGS?type=createSession&time=".time()."&nickname=$nickname&courseId=".$COURSE->id, "Creating Session for $nickname"); return $authtoken; } @@ -320,17 +327,20 @@ global $CFG; global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_CREATE_CLASS; - + global $LIVECLASSROOM_LOGS; + global $COURSE; + unset($attributes['longname']); while (list($key, $val) = each($attributes)) { if(($key!='class_id')&&(isset($val))&&($val!="")){ $list_attributes .= "&".$key."=".$val; } } + $final_list = "&target=$roomid"."&longname=$roomname".$list_attributes; - - $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS,$final_list); + $data = liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_CREATE_CLASS, $final_list); + preg_match("(\d*)", $data, $matches); $respcode = $matches[0]; @@ -339,11 +349,11 @@ return false; } if ( $respcode != 100) { - add_to_log("", "liveclassroom", "Create Room", "", "Cannot Create Class with id:$roomid, and name: $roomname."); + add_to_log($COURSE->id, "liveclassroom", "Create Room", "$LIVECLASSROOM_LOGS?type=errorCreateClass&time=".time()."&roomname=$roomname&roomId=$roomid&respcode=$respcode&courseId=".$COURSE->id, "Cannot Create Class with id : $roomid, and name : $roomname."); return false; } - add_to_log("", "liveclassroom", "Create Room", "", "$roomname create with success"); + add_to_log($COURSE->id, "liveclassroom", "Create Room", "$LIVECLASSROOM_LOGS?type=createClass&time=".time()."&roomname=$roomname&courseId=".$COURSE->id, "$roomname create with success"); return true; } @@ -514,20 +524,22 @@ function liveclassroom_api_delete_room($roomid) { global $CFG; global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_DELETE_ROOM; + global $LIVECLASSROOM_LOGS; + global $COURSE; liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid"); if ( $respcode == 302) { - add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed, target not found"); + add_to_log($COURSE->id, "liveclassroom", "Delete Room", "$LIVECLASSROOM_LOGS?type=errorDeleteRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid suppression failed"); // error( "Target not found"); return false; } else if ( $respcode != 100) { - add_to_log("", "liveclassroom", "Delete Room", "", "$roomid suppression failed"); + add_to_log($COURSE->id, "liveclassroom", "Delete Room", "$LIVECLASSROOM_LOGS?type=errorDeleteRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid suppression failed"); return false; } - add_to_log("", "liveclassroom", "Delete Room", "", "$roomid has been deleted with success"); + add_to_log($COURSE->id, "liveclassroom", "Delete Room", "$LIVECLASSROOM_LOGS?type=deleteRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been deleted with success"); return true; } @@ -541,20 +553,22 @@ global $CFG; global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM; + global $LIVECLASSROOM_LOGS; + global $COURSE; liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0"); preg_match("(\d*)", $data, $matches); $respcode = $matches[0]; if ( $respcode == 302) { - add_to_log("", "liveclassroom", "Open Room", "", "$roomid opening failed, target nor found"); + add_to_log($COURSE->id, "liveclassroom", "Open Room", "$LIVECLASSROOM_LOGS?type=errorOpenRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid opening failed"); return false; } if ( $respcode != 100) { - add_to_log("", "liveclassroom", "Open Room", "", "$roomid opening failed"); + add_to_log($COURSE->id, "liveclassroom", "Open Room", "$LIVECLASSROOM_LOGS?type=errorOpenRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid opening failed"); return false; } - add_to_log("", "liveclassroom", "Open Room", "", "$roomid has been opened with success"); + add_to_log($COURSE->id, "liveclassroom", "Open Room", "$LIVECLASSROOM_LOGS?type=openRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been opened with success"); return true; } @@ -568,21 +582,23 @@ global $CFG; global $LIVECLASSROOM_API_ADMIN, $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM; + global $LIVECLASSROOM_LOGS; + global $COURSE; liveclassroom_api_send_query($LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=1"); preg_match("(\d*)", $data, $matches); $respcode = $matches[0]; if ( $respcode == 302) { - add_to_log("", "liveclassroom", "Close Room", "", "$roomid closing failed, target nor found"); + add_to_log($COURSE->id, "liveclassroom", "Close Room", "$LIVECLASSROOM_LOGS?type=errorCloseRoom302&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid closing failed"); return false; } if ( $respcode != 100) { - add_to_log("", "liveclassroom", "Close Room", "", "$roomid closing failed"); + add_to_log($COURSE->id, "liveclassroom", "Close Room", "$LIVECLASSROOM_LOGS?type=errorCloseRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid closing failed"); return false; } - add_to_log("", "liveclassroom", "Close Room", "", "$roomid has been closed with success"); + add_to_log($COURSE->id, "liveclassroom", "Close Room", "$LIVECLASSROOM_LOGS?type=closeRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been closed with success"); return true; } @@ -597,7 +613,8 @@ global $CFG; global $LIVECLASSROOM_API_ADMIN; global $LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM; - + global $LIVECLASSROOM_LOGS; + global $COURSE; while (list($key, $val) = each($table_attributes)) { if(($key!='class_id')&&(isset($val))&&($val!="")){ @@ -613,11 +630,11 @@ $respcode = $matches[0]; if ( $respcode != 100) { - add_to_log("", "liveclassroom", "Modify Room", "", "$roomid modification failed"); + add_to_log($COURSE->id, "liveclassroom", "Modify Room", "$LIVECLASSROOM_LOGS?type=errorModifyRoom100&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "Room modification failed"); return false; } - add_to_log("", "liveclassroom", "Modify Room", "", "$roomid has been modified with success"); + add_to_log($COURSE->id, "liveclassroom", "Modify Room", "$LIVECLASSROOM_LOGS?type=modifyRoom&time=".time()."&roomId=$roomid&courseId=".$COURSE->id, "$roomid has been modified with success"); return true; } Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-12-07 10:41:11 UTC (rev 105) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-07 16:08:14 UTC (rev 106) @@ -36,8 +36,8 @@ //Suffixes used when creting the profiles account on the LC server $LIVECLASSROOM_TEACHER_SUFFIX = "_T"; //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_TEACHER_SUFFIX $LIVECLASSROOM_STUDENT_SUFFIX = "_S"; //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_STUDENT_SUFFIX -$LIVECLASSROOM_LOGS = "logs.php"; + /* * Get the prefix to use for creating rooms and users. @@ -97,7 +97,7 @@ /// will create a new instance and return the id number /// of the new instance. global $LIVECLASSROOM_LOGS; - + $liveclassroom->timemodified = time(); # May have to add extra stuff in here # @@ -105,16 +105,13 @@ $timenow = time(); - //add_to_log("", "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=addInstance&liveclassroomId=".$liveclassroom->name."&roomname=$roomname", "Activity ".$liveclassroom->name." has been added with success, associated to the room $roomname"); - - //return insert_record("liveclassroom", $liveclassroom); - + if($result = insert_record("liveclassroom", $liveclassroom)) { - add_to_log("", "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=addInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" added"); + add_to_log($liveclassroom->course, "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=addInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" added"); } else { - add_to_log("", "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=errorAddInstance", "Activity \"".$liveclassroom->name."\" has not been added"); + add_to_log($liveclassroom->course, "liveclassroom", "Add activity", "$LIVECLASSROOM_LOGS?type=errorAddInstance&liveclassroomId=".$result."&roomname=$roomname&time=$timenow", "Activity \"".$liveclassroom->name."\" has not been added"); $result=false; } @@ -131,7 +128,8 @@ $liveclassroom->timemodified = time(); $liveclassroom->id = $liveclassroom->instance; - + $roomname = liveclassroom_api_get_room_name($liveclassroom->type); + $timenow = time(); // Need to update the section @@ -158,7 +156,7 @@ error("Could not update the course module with the correct section"); } - add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=updateInstance", "Activity ".$liveclassroom->name." has been updated with success, associated to the room $roomname"); + add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=updateInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." has been updated with success"); return update_record("liveclassroom", $liveclassroom); /* @@ -180,19 +178,21 @@ /// and any data that depends on it. global $LIVECLASSROOM_LOGS; + if (! $liveclassroom = get_record("liveclassroom", "id", "$id")) { return false; } - + $roomname = liveclassroom_api_get_room_name($liveclassroom->type); + $timenow = time(); $result = true; # Delete any dependent records here # - if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) { - add_to_log("", "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=errorDeleteInstance", "Activity ".$liveclassroom->name." deletion failed"); + if (! delete_records("liveclassroom", "id", $liveclassroom->id)) { + add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=errorDeleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." deletion failed"); $result = false; } - add_to_log("", "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=deleteInstance", "Activity ".$liveclassroom->name." has been deleted with success"); + add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", "$LIVECLASSROOM_LOGS?type=deleteInstance&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Activity ".$liveclassroom->name." has been deleted with success"); return $result; } @@ -519,10 +519,11 @@ /// this function will permanently delete the instance /// and any data that depends on it. global $LIVECLASSROOM_LOGS; - $result = true; + + $result = true; if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) { $roomname = liveclassroom_api_get_room_name($liveclassroom->type); - + $timenow = time(); # Delete any dependent records here # foreach($liveclassrooms as $liveclassroom){ @@ -531,18 +532,18 @@ error("Course Module ID was incorrect"); } if (! delete_course_module($cm->id)) { - add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)"); + add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAllcm&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow&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("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "All activities associated to the room $roomname have not been deleted frome the liveclassroom database"); + add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAlldb&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database"); $result = false; } //delete in the course section too if (! delete_mod_from_section($cm->id, "$cm->section")) { - add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$mod->modulename." from that section"); + add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorDeleteAllsection&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow&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"); } @@ -550,7 +551,7 @@ } } - add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?type=deleteAll", "Delete all activities", "All activities associated to the room $roomname have been deleted with success"); + add_to_log($liveclassrooms->course, "liveclassroom", "$LIVECLASSROOM_LOGS?type=deleteAll&liveclassroomId=".$liveclassroom->id."&roomname=$roomname&time=$timenow", "Delete all activities", "All activities associated to the room $roomname have been deleted with success"); return $result; } @@ -912,10 +913,10 @@ $signature .= $value; $url_params .= "enc_".$key."=".$value."&" ; } - + if(strcmp(md5($signature), $request['signature'])!=0) { - add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSignature", "Init session", "Signature is not recognize."); - error("BadSignatureException"); + add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSignature", "Init session", "Signature is not recognize."); + error("Signature is not recognize."); return false; } @@ -923,7 +924,7 @@ return true; } else { - add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSessionTimeOut", "Init session", "Session has timed out due to inactivity."); + add_to_log($request['enc_course_id'], "liveclassroom", "$LIVECLASSROOM_LOGS?type=errorSessionTimeOut", "Init session", "Session has timed out due to inactivity."); error("The session has timed out due to inactivity. Please reload the page to reconnect."); return false; Modified: trunk/moodle/mod/liveclassroom/logs.php =================================================================== --- trunk/moodle/mod/liveclassroom/logs.php 2006-12-07 10:41:11 UTC (rev 105) +++ trunk/moodle/mod/liveclassroom/logs.php 2006-12-07 16:08:14 UTC (rev 106) @@ -1,8 +1,9 @@ <?php //This page is to show the logs types and errors, and to explain how resolve the errors! -require_once("../../../config.php"); +require_once("../../config.php"); global $CFG; + require_once($CFG->libdir.'/datalib.php'); require_once($CFG->dirroot.'/course/lib.php'); @@ -17,10 +18,15 @@ return false; } if (! $course = get_record("course", "id", $liveclassroom->course)) { - return false; - } + return false; + } +} +else if (isset($_GET['courseId'])) { + if (! $course = get_record("course", "id", $_GET['courseId'])) { + return false; + } +} -} if(isset($_GET['roomname'])) { $roomname = $_GET['roomname']; } @@ -31,32 +37,187 @@ switch ($type) { - case "errorUrlUnavailable": - $message = "URL unavailable."; - break; + case "addInstance": $message = "Activity \"".$liveclassroom->name."\" has been added with success, associated to the room \"$roomname\"."; - $information = "Activity \"".$liveclassroom->name."\" added"; + $information = "Activity \"".$liveclassroom->name."\" creation"; break; + case "errorAddInstance": + $information = "Activity \"".$liveclassroom->name."\" creation"; + $message = "Error : URL ".$CFG->liveclassroom_servername." creation failed."; + break; case "updateInstance": + $information = "Activity \"".$liveclassroom->name."\" update"; $message = "Activity \"".$liveclassroom->name."\" has been updated with success, associated to the room \"$roomname\"."; - - break; + break; case "deleteInstance": - $message = "Activity \"".$liveclassroom->name."\" has been deleted with success."; + $information = "Activity \"".$liveclassroom->name."\" suppression"; + $message = "Activity \"".$liveclassroom->name."\" associated to the room \"$roomname\" has been deleted with success."; break; case "errorDeleteInstance": - $message = "Activity \"".$liveclassroom->name."\" deletion failed. "; + $information = "Error : Activity \"".$liveclassroom->name."\" suppression"; + $message = "Error : Activity \"".$liveclassroom->name."\" associated to the room \"$roomname\". has not been deleted"; break; case "deleteAll": + $information = "Activities suppression"; $message = "All activities associated to the room \"$roomname\" have been deleted with success. "; break; + case "errorDeleteAllcm": + $information = "Activities suppression"; + $message = "All activities associated to the room \"$roomname\" have been deleted with success. "; + if(isset($_GET['cm'])){ + $tip = "Could not delete the ".$_GET['cm']." (coursemodule), please you need to delete it manually"; + } + break; + case "errorDeleteAlldb": + $information = "Activities suppression"; + $message = "All activities associated to the room $roomname have not been deleted from the liveclassroom database."; + $tip = "Please you need to delete it manually"; + break; + case "errorDeleteAllsection": + $information = "Activities suppression"; + $message = "All activities associated to the room $roomname have not been deleted from the liveclassroom database."; + if( (isset($_GET['section'])) && (isset($_GET['cm'])) ){ + $tip = "Could not delete the ".$_GET['cm']." from the section ".$_GET['section']." , please you need to delete it manually"; + } + break; case "errorSignature": - $message = "Signature is not recognize. "; + $information = "Testing signature"; + $message = "Error : Signature is not recognize."; break; case "errorSessionTimeOut": + $information = "Testing session time"; $message = "Session has timed out due to inactivity."; + break; + case "errorUrlUnavailable": + $information = "URL unavailable."; + $message = "Error : URL ".$CFG->liveclassroom_servername." unavailable."; break; + case "errorAuthentication": + $information = "Authentication Failed."; + if(isset($_GET['respcode'])){ + $message = "Error : Authentication Failed."; + $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator."; + } + break; + case "authentication": + $information = "Authentication succeeded."; + $message = "The authentication to the Live Classroom server is succeeded."; + break; + case "createUser": + $information = "User creation succeeded."; + if(isset($_GET['userId'])){ + $message = "User creation succeeded. Id of the new user : ".$_GET['userId']; + } + break; + case "errorCreateUser": + $information = "User creation"; + if(isset($_GET['userId'])){ + $message = "Error : ".$_GET['userId']." Creation Failed."; + $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator."; + } + break; + case "createSession": + $information = "Session creation succeeded."; + if(isset($_GET['nickname'])){ + $message = "Session created for ".$_GET['nickname']; + } + break; + case "errorCreateSession": + $information = "Session creation"; + if( (isset($_GET['respcode'])) && (isset($_GET['nickname'])) ){ + $message = "Error : Cannot create a session for ".$_GET['nickname']; + $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator."; + } + break; + case "createClass": + $information = "Room creation succeeded."; + if(isset($_GET['roomname'])){ + $message = $_GET['roomname']." has been created with success on the Live Classroom server"; + } + break; + case "errorCreateClass": + $information = "Room creation"; + if( (isset($_GET['respcode'])) && (isset($_GET['roomname'])) ){ + $message = "Error : Cannot Create Class with id : ".$_GET['roomId'].", and name : ".$_GET['roomname']; + $tip = "The response code is : ".$_GET['respcode']."Please contact your administrator."; + } + break; + case "deleteRoom": + $information = "Room suppression succeeded."; + if(isset($_GET['roomId'])){ + $message = $_GET['roomId']." has been deleted with success."; + } + break; + case "errorDeleteRoom100": + $information = "Room suppression"; + if(isset($_GET['roomId']) ){ + $message = "Error : Cannot delete room with id : ".$_GET['roomId']; + $tip = "The response code is : 100. Please contact your administrator."; + } + break; + case "errorDeleteRoom302": + $information = "Room suppression"; + if(isset($_GET['roomId']) ){ + $message = "Error : Cannot delete room with id : ".$_GET['roomId']; + $tip = "The response code is : 302. The target is not found. Please contact your administrator."; + } + break; + case "openRoom": + $information = "Room opening succeeded."; + if(isset($_GET['roomId'])){ + $message = $_GET['roomId']." has been opened with success."; + } + break; + case "errorOpenRoom100": + $information = "Room opening"; + if(isset($_GET['roomId']) ){ + $message = "Error : Cannot open room with id : ".$_GET['roomId']; + $tip = "The response code is : 100. Please contact your administrator."; + } + break; + case "errorOpenRoom302": + $information = "Room opening"; + if(isset($_GET['roomId']) ){ + $message = "Error : Cannot open room with id : ".$_GET['roomId']; + $tip = "The response code is : 302. The target is not found. Please contact your administrator."; + } + break; + case "closeRoom": + $information = "Room closing succeeded."; + if(isset($_GET['roomId'])){ + $message = $_GET['roomId']." has been closed with success."; + } + break; + case "errorCloseRoom100": + $information = "Room closing"; + if(isset($_GET['roomId']) ){ + $message = "Error : Cannot close room with id : ".$_GET['roomId']; + $tip = "The response code is : 100. Please contact your administrator."; + } + break; + case "errorCloseRoom302": + $information = "Room closing"; + if(isset($_GET['roomId']) ){ + $message = "Error : Cannot close room with id : ".$_GET['roomId']; + $tip = "The response code is : 302. The target is not found. Please contact your administrator."; + } + break; + case "modifyRoom": + $information = "Room modification succeeded."; + if(isset($_GET['roomId'])){ + $message = $_GET['roomId']." has been modified with success."; + } + break; + case "errorModifyRoom100": + $information = "Room modification"; + if(isset($_GET['roomId']) ){ + $message = "Error : Cannot modify room with id : ".$_GET['roomId']; + $tip = "The response code is : 100. Please contact your administrator."; + } + break; + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |