Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/enrol/meta/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_meta_settings', '', get_string('pluginname_desc', 'enrol_meta')));
00032 
00033     if (!during_initial_install()) {
00034         $allroles = array();
00035         foreach (get_all_roles() as $role) {
00036                 $rolename = strip_tags(format_string($role->name)) . ' ('. $role->shortname . ')';
00037                 $allroles[$role->id] = $rolename;
00038         }
00039         $settings->add(new admin_setting_configmultiselect('enrol_meta/nosyncroleids', get_string('nosyncroleids', 'enrol_meta'), get_string('nosyncroleids_desc', 'enrol_meta'), array(), $allroles));
00040 
00041         $settings->add(new admin_setting_configcheckbox('enrol_meta/syncall', get_string('syncall', 'enrol_meta'), get_string('syncall_desc', 'enrol_meta'), 1));
00042 
00043         $options = array(
00044             ENROL_EXT_REMOVED_UNENROL        => get_string('extremovedunenrol', 'enrol'),
00045             ENROL_EXT_REMOVED_SUSPENDNOROLES => get_string('extremovedsuspendnoroles', 'enrol'));
00046         $settings->add(new admin_setting_configselect('enrol_meta/unenrolaction', get_string('extremovedaction', 'enrol'), get_string('extremovedaction_help', 'enrol'), ENROL_EXT_REMOVED_UNENROL, $options));
00047     }
00048 }
 All Data Structures Namespaces Files Functions Variables Enumerations