Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/admin/mnet/profilefields_form.php
Go to the documentation of this file.
00001 <?php
00002 
00003 // This file is part of Moodle - http://moodle.org/
00004 //
00005 // Moodle is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // Moodle is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00017 
00027 if (!defined('MOODLE_INTERNAL')) {
00028     die('Direct access to this script is forbidden.');    
00029 }
00030 
00031 require_once($CFG->libdir . '/formslib.php');
00032 
00036 class mnet_profile_form extends moodleform {
00037 
00038     function definition() {
00039         global $CFG;
00040         $mform =& $this->_form;
00041 
00042 
00043         $mform->addElement('hidden', 'hostid', $this->_customdata['hostid']);
00044         $fields = mnet_profile_field_options();
00045 
00046         // Fields to import ----------------------------------------------------
00047         $mform->addElement('header', 'import', get_string('importfields', 'mnet'));
00048 
00049         $select = $mform->addElement('select', 'importfields', get_string('importfields', 'mnet'), $fields['optional']);
00050         $select->setMultiple(true);
00051 
00052         $mform->addElement('checkbox', 'importdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileimportfields));
00053 
00054         // Fields to export ----------------------------------------------------
00055         $mform->addElement('header', 'export', get_string('exportfields', 'mnet'));
00056 
00057         $select = $mform->addElement('select', 'exportfields', get_string('exportfields', 'mnet'), $fields['optional']);
00058         $select->setMultiple(true);
00059 
00060         $mform->addElement('checkbox', 'exportdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileexportfields));
00061 
00062         $this->add_action_buttons();
00063     }
00064 }
 All Data Structures Namespaces Files Functions Variables Enumerations