[Hw4mdl-svn] SF.net SVN: hw4mdl: [87] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
From: <sh...@us...> - 2006-10-13 15:39:15
|
Revision: 87 http://svn.sourceforge.net/hw4mdl/?rev=87&view=rev Author: shazan Date: 2006-10-13 08:04:41 -0700 (Fri, 13 Oct 2006) Log Message: ----------- prefix are managed depending of the admin user name Modified Paths: -------------- trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/lib.php Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-10-13 13:48:08 UTC (rev 86) +++ trunk/moodle/mod/liveclassroom/api.php 2006-10-13 15:04:41 UTC (rev 87) @@ -43,7 +43,7 @@ require_once('System.php'); -$LIVECLASSROOM_MOODLE_PREFIX = '_moodle_'; +$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix(); $LIVECLASSROOM_API_ADMIN = '/admin/api/api.pl?'; $LIVECLASSROOM_API_FUNCTION_NOOP = 'function=NOOP'; @@ -1288,5 +1288,27 @@ return $table_result; } + +/* +* Get the prefix to use for creating rooms and users. +* +* return $prefix : a string which is the prefix to use +*/ +function liveclassroom_api_get_prefix() { + global $CFG; + + //get the admin user name + $aun = $CFG->liveclassroom_adminusername; + if( (substr($aun, 0,1)=='_') && (substr($aun, -1,1)=='_') ) { //Prefix + $prefix = $aun; + + } + else { + $prefix = ''; + + } + return $prefix; + +} ?> Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-10-13 13:48:08 UTC (rev 86) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-10-13 15:04:41 UTC (rev 87) @@ -40,9 +40,6 @@ - - - /** * Validate the data in passed in the configuration page * @param $config - the information from the form mod.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |