Source for file object_config.php
Documentation is available at object_config.php
* Distributor 1.0 configuration form.
* This is a fragment of HTML which gives the form elements for configuration of a distribution object, v1.0.
* ONLY the basic form elements should be included.
* The "form" tags and submit button are already specified outside.
* The $auth_obj and $sloodleauthid variables will identify the object being configured.
* @package sloodledistributor
* @copyright Copyright (c) 2007-8 Sloodle (various contributors)
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
* @contributor Peter R. Bloomfield
// IMPORTANT: make sure this is called from within a Sloodle script
error('Not called from within a Sloodle script.');
// Execute everything within a function to ensure we don't mess up the data in the other file
//--------------------------------------------------------
// Determine which course is being accessed
$courseid =
$auth_obj->course->get_course_id();
// We need to fetch a list of visible distributors on the course
// Get the ID of the Sloodle type
$rec =
get_record('modules', 'name', 'sloodle');
// Get all visible Sloodle modules in the current course
$recs =
get_records_select('course_modules', "course = $courseid AND module = {$rec->id} AND visible = 1
");
// Fetch the distributor instance
// Store the distributor details
$distributors[$cm->id] =
$inst->name;
//--------------------------------------------------------
// Get the current object configuration
// Setup our default values
///// GENERAL CONFIGURATION /////
print_box_start('generalbox boxaligncenter');
echo
'<h3>'.
get_string('generalconfiguration','sloodle').
'</h3>';
// Ask the user to select a distributor
echo
get_string('selectdistributor','sloodle').
': ';
choose_from_menu($distributors, 'sloodlemoduleid', $sloodlemoduleid, '<i>('.
get_string('nodistributorinterface','sloodle').
')</i>', '', 0);
// Ask the user for a refresh period (# seconds between automatic updates)
echo
get_string('refreshtimeseconds','sloodle').
': ';
echo
'<input type="text" name="sloodlerefreshtime" value="'.
$sloodlerefreshtime.
'" size="8" maxlength="8" />';
///// ACCESS LEVELS /////
// There is no need for server access controls, as users cannot access the server through the object
// (server access is entirely done through Moodle for this one)
Documentation generated on Mon, 07 Jul 2008 12:33:07 +0100 by phpDocumentor 1.4.0