Editing moodle.php

Editing moodle.php

by Abdalla Yousif -
Number of replies: 13

Hi

I am using moodle 1.9+ for my course site, and edited some strings in moodle.php such as changing message " You are logged as....." to be "Welcome to sitename....." and similar messages.

I did that through admin/language/lang editing , nothing change, and also going manually to moodle.php and change it without success.

Does this version allows this kind of change? if yes why is not changing it? if not, how can I do that?

Please help.

thnaks

రేటింగుల సగటు: -
In reply to Abdalla Yousif

Re: Editing moodle.php

by Nehad Hroub -
Hi Abdalla Yousif,

I had this problem while ago, the Moodle dos not accept any changes in it is code.
To do this you must be reinstall the Moodle after added your changes.

Best.

/Nehad

In reply to Nehad Hroub

Re: Editing moodle.php

by Abdalla Yousif -

Thanks Nehad;

I have a question, when you reinstall moodle this is not going to overwrite moodel.php the one you edit it, is it?

thanks again

In reply to Abdalla Yousif

Re: Editing moodle.php

by Mauno Korpelainen -

Usually the reason for non-sticking changes to php files is eaccelerator (enabled).

If you are using for example the Complete Windows package it has by default PHP eaccelerator enabled and you need to edit your php.ini file (found from server\php folder) and change

eaccelerator.enable = "1"

to

eaccelerator.enable = "0"

or comment that line out with semicolon.

Then save php.ini and restart your apache/server (XAMPP)

No need to reinstall moodle wink.

In reply to Mauno Korpelainen

Re: Editing moodle.php

by David Mudrák -
Core developers బొమ్మ Documentation writers బొమ్మ Moodle HQ బొమ్మ Particularly helpful Moodlers బొమ్మ Peer reviewers బొమ్మ Plugin developers బొమ్మ Plugins guardians బొమ్మ Testers బొమ్మ Translators బొమ్మ
Mauno is right. Definitely neither reinstall your Moodle nor kill any kittens to make this work. Using the in-built tool for language customization is the right way.

Moving this thread into Languages forum.
In reply to Mauno Korpelainen

Re: Editing moodle.php

by Stephanie Singer -

My moodle is hosted with a reliable third-party webhost (Dreamhost). They do *not* have eAccelerator enabled in the php installation that is underlying my moodle installation. Yet my changes to moodle.php (via the Language Editor) do not show up on my site.

Please advise!

In reply to Stephanie Singer

Re: Editing moodle.php

by Robert Brenstein -
Moodle itself does some language caching. Moodle 2 actually quite actively (you don't say which version you have) and has some administrative options related to that. Local browser can also cache things for you as well as some proxy in between. Caching is the issue if you re-edit the moodle.php file and your changes are there but you still do not see them in your browser. The issue originally discussed in this thread was that the changes were disappearing.
In reply to Robert Brenstein

Re: Editing moodle.php

by Stephanie Singer -

I'm using 1.9.10.

When I look at the moodle.php file in the language editor, I see the changes I've made, so I believe that the moodle.php file has the changes. I still do not see them in my browser. If I understand you correctly, caching is the issue. What should I do?

Thank you for your quick reply!

In reply to Abdalla Yousif

Re: Editing moodle.php

by Trevor Cunningham -
I've had the same problem. A work-around, without re-installing, is to edit the moodle.php file at the server level through your file manager. The file can be found in domain/(your moodle foler)/lang/(your language pack)