Changing field names or adding new fields

Changing field names or adding new fields

by Bill Weinheimer -
Number of replies: 2

I've been customizing my Moodle installation to allow for specific information to be collected from students while ignoring other data that has no meaning in my setting.  So far I've learned a lot about the profile edit page and the $user array, but two problems still remain.

First, I've renamed some fields (the ones normally used for all of the ICQ, MSN, Yahoo, etc.) and everything works well except for the fact that my renamed fields show on the edit profile page surrounded by two sets of square brackets, as  newfieldname.  How do I fix that?  Or do I have to add fields to mdl_user?

Second, while making these changes I have tried to make some of the fields that were text inputs into drop down menus.  I get the two bracket issue listed above with my list of choices, and I can't seem to get the item from the $choices array into the $user->whatever field.

Has anyone else run into this?  I am running 1.5.2 with mySQL 2.5 on Red Hat Linux 8.

Thanks,

Bill

Average of ratings: -
In reply to Bill Weinheimer

Re: Changing field names or adding new fields

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Bill,

Two sets of square brackets indicate missing strings. Generally these disappear by updating your language pack, however if you've customised your site then you'll most likely need to add the strings to a file in your local language pack e.g. moodle/lang/en_local/moodle.php.
In reply to Helen Foster

Re: Changing field names or adding new fields

by Bill Weinheimer -
Thank you Helen, that was exactly what I needed to do.  I really appreciate your help.