Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/enrol/guest/settings.php
Go to the documentation of this file.
00001 <?php
00002 // This file is part of Moodle - http://moodle.org/
00003 //
00004 // Moodle is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // Moodle is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00016 
00026 defined('MOODLE_INTERNAL') || die();
00027 
00028 if ($ADMIN->fulltree) {
00029 
00030     //--- general settings -----------------------------------------------------------------------------------
00031     $settings->add(new admin_setting_heading('enrol_guest_settings', '', get_string('pluginname_desc', 'enrol_guest')));
00032 
00033     $settings->add(new admin_setting_configcheckbox('enrol_guest/requirepassword',
00034         get_string('requirepassword', 'enrol_guest'), get_string('requirepassword_desc', 'enrol_guest'), 0));
00035 
00036     $settings->add(new admin_setting_configcheckbox('enrol_guest/usepasswordpolicy',
00037         get_string('usepasswordpolicy', 'enrol_guest'), get_string('usepasswordpolicy_desc', 'enrol_guest'), 0));
00038 
00039     $settings->add(new admin_setting_configcheckbox('enrol_guest/showhint',
00040         get_string('showhint', 'enrol_guest'), get_string('showhint_desc', 'enrol_guest'), 0));
00041 
00042 
00043     //--- enrol instance defaults ----------------------------------------------------------------------------
00044     $settings->add(new admin_setting_heading('enrol_guest_defaults',
00045         get_string('enrolinstancedefaults', 'admin'), get_string('enrolinstancedefaults_desc', 'admin')));
00046 
00047     $settings->add(new admin_setting_configcheckbox('enrol_guest/defaultenrol',
00048         get_string('defaultenrol', 'enrol'), get_string('defaultenrol_desc', 'enrol'), 1));
00049 
00050     $options = array(ENROL_INSTANCE_ENABLED  => get_string('yes'),
00051                      ENROL_INSTANCE_DISABLED => get_string('no'));
00052     $settings->add(new admin_setting_configselect_with_advanced('enrol_guest/status',
00053         get_string('status', 'enrol_guest'), get_string('status_desc', 'enrol_guest'),
00054         array('value'=>ENROL_INSTANCE_DISABLED, 'adv'=>false), $options));
00055 }
00056 
 All Data Structures Namespaces Files Functions Variables Enumerations