/lib/sl_generallib.phpSloodle general library.
Provides various utility functionality for general Sloodle purposes.
require_once
(SLOODLE_DIRROOT.'/lib/sl_iolib.php')
(line 22)
Include the IO library.
Old logging function
Converts an array vector to a string vector.
Array vector should be associative, containing elements 'x', 'y', and 'z'. Converts to a string vector of format "<x,y,z>".
Determines if the specified course module instance is of the named type.
For example, this can check if a particular instance is a "forum" or a "chat".
Generates teleport coordinates for a user who has already finished the LoginZone process.
Gets the site-wide authentication from the configuration table.
Gets a Sloodle configuration value from Moodle's "config" table.
This function does not necessarily need to be used. All configuration data is available as named members of Moodle's $CFG global variable. NOTE: in Sloodle debug mode, this function will terminate the script with an error if the name is not prefixed with "sloodle_".
Obtains the identified course module instance database record.
Gets an array of the names of all objects in the Object Distributor.
NOTE: Stored in the Moodle configuration table as value "sloodle_distrib_objects". Must be set manually as a pipe-delimited list, e.g. "object1|object2|object3".
Gets the position of the site-wide LoginZone object.
Gets the name of the region where the site-wide LoginZone object was most recently rezzed.
Gets the size of the site-wide LoginZone object.
Obtains the ID number of the specified module (type not instance).
Gets the site-wide Sloodle prim password from the configuration table.
Determines whether or not automatic registration is enabled.
Determines whether or not the specified course module instance is visible.
Checks that the instance itself and the course section are both valid.
Determines whether or not Sloodle is installed.
Queries Moodle's modules table for a Sloodle entry. NOTE: does not check for the presence of the Sloodle files.
Calculates the maximum and minimum bounds of the site-wide LoginZone.
Returns the bounds as a numeric array of two associate array vectors: ($max, $min). (Or returns false if no LoginZone position/size could be found in the Moodle configuration table).
Checks if the specified position is in the current (site-wide) loginzone.
Old form of the {@link: sloodle_set_prim_password()} function.
Now deliberately terminates the script if called. DO NOT USE!
Generates a random position within the specified cubic zone.
Generates a random login security token.
Uses mixed-case letters and numbers to generate a random 16-character string.
Generates a random web password Uses mixed-case letters and numbers to generate a random 8-character string.
Rounds the specified 3d vector integer values.
Can handle/return a string vector, or an array vector. (Output type matches input type).
Sends an XMLRPC message into Second Life.
Sets the site-wide authentication method in the Moodle configuration table.
Note: no validation is performed on the parameter except to establish that it is a string
Sets a Sloodle configuration value.
This data will be stored in Moodle's "config" table, so it will persist even after Sloodle is uninstalled. After being set, it will be available (read-only) as a named member of Moodle's $CFG variable. NOTE: in Sloodle debug mode, this function will terminate the script with an error if the name is not prefixed with "sloodle_".
Sets the position of the site-wide LoginZone object (stored in the Moodle configuration table).
Sets the name of the region where the site-wide LoginZone object was most recently rezzed.
Sets the size of the site-wide LoginZone object (stored in the Moodle configuration table).
Sets the site-wide Sloodle prim password from the configuration table.
Note: this functio peforms no validation on the input value, except to determine that it is a string.
Converts a string vector to an array vector.
String vector should be of format "<x,y,z>". Converts to associative array with members 'x', 'y', and 'z'. Returns false if input parameter was not of correct format.
Documentation generated on Tue, 04 Mar 2008 15:08:40 +0000 by phpDocumentor 1.4.0