Enrollment Key Text

Enrollment Key Text

by Ronnie Izzo -
Number of replies: 10

How would I go about changing the wording in the enrollment key text.  I've tried all sorts of ways to include changing it in "lang/en-utf8/moodle.php" and no luck.  Any ideas?

I'm using 1.7

Thanks.

Average of ratings: -
In reply to Ronnie Izzo

Re: Enrollment Key Text

by Matt Molloy -

Hi Ron,

  • First off, go to moodle\lang\en_utf8 and save a copy of moodle.php. That way, if it all goes pear-shaped, you have a good copy to revert to.
  • Next, open moodle.php in a simple text editor such as wordpad or notepad (NOT MS Word), and do a find for all or part of the text you are looking for. For me, a find for 'one-time' brought me straight to the text.
  • Make and save what ever changes you require. If you are working off a remote server, don't forget you have to 'put' the altered file back on there.
  • Now your site should reflect the changes. If not, try an F5 (refresh) or ctrl+F5, or a different browser.

Matt

In reply to Matt Molloy

Re: Enrollment Key Text

by Ronnie Izzo -

Thanks Matt.  I did like you said and tried searching for the text I want to change and It doesn't seem to be there.  I'm wondering if I'm in the right file:

Editing /home/nhhed/public_html/lang/en_utf8/moodle.php...

Here's what I'm trying to change:

This course requires an 'enrollment key' - a one-time
password that you should have received from your Teacher

In reply to Ronnie Izzo

Re: Enrollment Key Text

by Just H -
Hi Ron

Is this the age old spelling question (one "l" v two "ls")? big grin

If so, just change your default language to en_us.

regards
H


In reply to Ronnie Izzo

Re: Enrollment Key Text

by Matt Molloy -

Hi Ron,

Yes, that is the file, and the text is there, on line 529 or there abouts. If you are using wordpad or notepad, the string is about one third way down the file:

$string['enrolmentend'] = 'Enrolment Ends';

$string['enrolmentkey'] = 'Enrolment key';

$string['enrolmentkeyfrom'] = 'This course requires an \'enrolment key\' - a one-time<br />

password that you can get from $a';

$string['enrolmentkeyhint'] = 'That enrolment key was incorrect, please try again<br />

(Here\'s a hint - it starts with \'$a\')';

If you are getting that text on your site, it must be in the moodle.php file. Can you attach a copy of your moodle.php file to a posting?

On the one 'l' or two 'll's front, I think that has been trashed to death, with the concensus being either spelling is acceptable - one is US and the other is English (don't ask me which is which!).

Regards,

Matt

In reply to Matt Molloy

Re: Enrollment Key Text

by Ronnie Izzo -

Hi Matt, here's a copy of the moodle.php file I've changed. I did like you said and put it in Notepad, changed the text (added the words "all lower case") in a couple of areas but still no luck. It seems like it may be another file I should be changing. No matter what I do to moodle.php, nothing is happening. I've refreshed, shut down, cleared memory, waited a couple of days and it still isn't happening. I can't wait to find out what the issue is it's probably the simplest thing.

Thanks again for your help.

Ron

(Edited by Helen Foster - cut and pasted changed moodle.php into attached zipped txt file - original submission Tuesday, 28 August 2007, 07:57 PM)
In reply to Ronnie Izzo

Re: Enrollment Key Text

by Matt Molloy -

Hello Ron,

Curiouser and curiouser! I dropped your moodle.php file into my own installation, and, as you can see from the attached, it is having the desired effect with regards to the enrolment text.

Here are a few suggestions:

  • Are you sure you got this moodle.php file from the same language folder as the one you are using for your site? In other words, if you are using en_us as your site language, did you alter the moodle.php file from the en_us folder. There are 3 English language folders: en, en_us and en_uft8. If you are in doubt, modify all three moodle.php files and save them back to their relevant folders. If you are using an earlier version of Moodle, you may not have yet migrated to using en_uft8. These are long shots, but it is something simple like this.
  • Are you sure you saved the edited moodle.php file back to the correct folder?
  • What programme did you use to edit the file? I know wordpad and notepad sometimes put a not so helpful ".txt" appendage on to files when edited by them. If so, your system would treat them as ordinary text files, and not execute any php codes in them. In order to avoid this, when saving the file type: "moodle.php" into the save as box. Make sure to use the quotes, as this stops wordpad or notepad from adding the .txt appendage.

Regards,

Matt

Attachment ron.jpg
In reply to Matt Molloy

Re: Enrollment Key Text

by Ronnie Izzo -

Thanks Matt and Helen, I just got it working.  The problem was like you said I wasn't changing the right file.  I am using Eng (US) and I kept changing the other.  So I went into Language Editing and made sure I was editing the right language.  Thanks Again.  Have a great day!

Ron

In reply to Ronnie Izzo

Re: Enrollment Key Text

by jimmy kent -
I had the same problem, thanks for your help guys. I found changing texts from the admin panel to be the easiest. Cheers
In reply to jimmy kent

Re: Enrollment Key Text

by Robin Brekke -
Thank you all for the information. I used it today to reword the default text. I found out I needed to change my language set too. (I was originally editing the wrong language set.) I did it all through the Admin screen and it worked slick!  Thanks.
In reply to Ronnie Izzo

Re: Enrollment Key Text

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 Ron,

The easiest way to change any text in Moodle is by using the Moodle interface via Administration > Language > Language editing. Please see the edit strings section of the Language editing documentation for more information.