Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/backup/util/helper/backup_anonymizer_helper.class.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 
00047 class backup_anonymizer_helper {
00048 
00049     public static function process_user_auth($value) {
00050         return 'manual'; // Set them to manual always
00051     }
00052 
00053     public static function process_user_username($value) {
00054         static $counter = 0;
00055         $counter++;
00056         return 'anon' . $counter; // Just a counter
00057     }
00058 
00059     public static function process_user_idnumber($value) {
00060         return ''; // Just blank it
00061     }
00062 
00063     public static function process_user_firstname($value) {
00064         static $counter = 0;
00065         $counter++;
00066         return 'anonfirstname' . $counter; // Just a counter
00067     }
00068 
00069     public static function process_user_lastname($value) {
00070         static $counter = 0;
00071         $counter++;
00072         return 'anonlastname' . $counter; // Just a counter
00073     }
00074 
00075     public static function process_user_email($value) {
00076         static $counter = 0;
00077         $counter++;
00078         return 'anon' . $counter . '@doesntexist.com'; // Just a counter
00079     }
00080 
00081     public static function process_user_icq($value) {
00082         return ''; // Clean icq
00083     }
00084 
00085     public static function process_user_skype($value) {
00086         return ''; // Clean skype
00087     }
00088 
00089     public static function process_user_yahoo($value) {
00090         return ''; // Clean yahoo
00091     }
00092 
00093     public static function process_user_aim($value) {
00094         return ''; // Clean aim
00095     }
00096 
00097     public static function process_user_msn($value) {
00098         return ''; // Clean msn
00099     }
00100 
00101     public static function process_user_phone1($value) {
00102         return ''; // Clean phone1
00103     }
00104 
00105     public static function process_user_phone2($value) {
00106         return ''; // Clean phone2
00107     }
00108 
00109     public static function process_user_institution($value) {
00110         return ''; // Clean institution
00111     }
00112 
00113     public static function process_user_department($value) {
00114         return ''; // Clean department
00115     }
00116 
00117     public static function process_user_address($value) {
00118         return ''; // Clean address
00119     }
00120 
00121     public static function process_user_city($value) {
00122         return 'Perth'; // Set city
00123     }
00124 
00125     public static function process_user_country($value) {
00126         return 'AU'; // Set country
00127     }
00128 
00129     public static function process_user_lastip($value) {
00130         return '127.0.0.1'; // Set lastip to localhost
00131     }
00132 
00133     public static function process_user_picture($value) {
00134         return 0; // No picture
00135     }
00136 
00137     public static function process_user_url($value) {
00138         return ''; // No url
00139     }
00140 
00141     public static function process_user_description($value) {
00142         return ''; // No user description
00143     }
00144 
00145     public static function process_user_descriptionformat($value) {
00146         return 0; // Format moodle
00147     }
00148 
00149     public static function process_user_imagealt($value) {
00150         return ''; // No user imagealt
00151     }
00152 }
 All Data Structures Namespaces Files Functions Variables Enumerations