Why the Hack?
- All of our students are in the same country, so we don't need the "country" info.
- It's more useful for us to know which teacher a student is studying with for Moodle courses shared by multiple teachers.
- Note: This hack wouldn't be useful for places that are teaching a lot of courses. Our Moodle is set up only for our English department.
- Moodle 1.8's "User profile fields" don't offer these features. (at least at this time, March 31, 2007)
- When listing "Participants" the teachers' names can be seen.
Replace what's in /lang/en_utf8/countries.php
<?PHP // $Id: countries.php,v 1.1.8.1 2006/11/01 09:37:07 moodler Exp $
// countries.php
// CK 070331 - Substitute "teacher" for country since all our students are in the same country.
$string['aa'] = 'do not know';
$string['bg'] = 'Bob Green';
$string['bv'] = 'Bruce Victor';
$string['ch'] = 'Carl Hughs';
$string['ck'] = 'Charles Kelly';
$string['gk'] = 'Glenn Kirk';
$string['lk'] = 'Larry Keller';
$string['mo'] = 'Mark Olson';
$string['pr'] = 'Paul Revere';
?>
Add these lines at the end of /lang/en_utf8/moodle.php
- Since they are at the end, you don't need to worry about finding the ones they are replacing.
// Teacher Instead of Country CK2007-03-31
$string['country'] = 'Teacher';
$string['selectacountry'] = 'Choose your teacher';
Additional Notes
- If you use other language packs, you'll need add the same lines at the end of all moodle.php files
- Or you can just delete those 2 $strings from those files.
- Delete the countries.php from all other language packs, so the default English is used.
- Instead of using this hack for teachers' names, you could use it for anything that requires a menu selection.
Related Hack
- You can also substitute "Hobby" for "City" like this.
// Hobby Instead of City CK 2007-03-29
$string['city'] = 'Hobby / Interest / Free Time';
$string['location'] = 'Interest';