label file location

Re: label file location

by Mauno Korpelainen -
Number of replies: 7

Most likely in table mdl_course_sections but a better way than editing database manually is to disable editor from your user profile: Click your name - Edit profile - and change "When editing text" - Use standard web forms and click update profile.

Then just go back to edit topic section or label without editor...

In reply to Mauno Korpelainen

Re: label file location

by Brian Lockwood -
Mmm, I don't think I was clear. Previously, I have edited the html (which is not in a database table) using vi.

I just can't remember where it is. (The html file that is).

mdl_course_sections is just a set of pointers to various course folders.

In reply to Brian Lockwood

Re: label file location

by Jez H -
Most labels are in

moodle/lang/en_utf8/moodle.php

or one of the other Lang folders

If you edited html labels would it not have been the theme?

/moodle/theme/yourTheme/yourFiles

To my knowledge everything else on the front page is in the database.

If you are talking about course specific stuff then you would need to look it

moodle/course

where there are some html files...
In reply to Brian Lockwood

Re: label file location

by Mauno Korpelainen -
"If I add a label to the front page (logged in front page) the html editor edits out some javascript that I want to be in the label.
Where is the label file held so I can edit it manually?"

Names of different things in moodle are sometimes difficult - I'm not sure yet what you really want to do but if you want to edit files that are used to create labels go to folder mod/label (the activity).

If the problem is that htmleditor cuts javascript it's normal behaviour of htmlarea - and you can disable htmlarea to be able to add those javascripts.

If you want to disable the filters you may need to edit some lib files from folder lib

If you have added a label from Add a resource - Insert a label then the label is saved to table mdl_label

If you have included a topic section from front page settings or edited some other section from boxes in courses the content is in mdl_course_sections

If none of these suggestions helped you could attach a screenshot of the problem...
In reply to Mauno Korpelainen

Re: label file location

by Brian Lockwood -
The label I was after was in mdl_label
I have a load of labels in my moodle which various users have put in, but I have moved server. Many of the images in these labels have absolute path names,

e.g. http://oldservernamepath/moodle....

I need http://newservernamepath/moodle

or even just /moodle

I think I need some fancy sql, what do you think.
In reply to Brian Lockwood

Re: label file location

by Mauno Korpelainen -

If you have moved server and changed paths in config.php you can use http://yoursite/admin/replace.php to replace those old links with new links from the whole database ...

In reply to Mauno Korpelainen

Re: label file location

by Brian Lockwood -
Hey! thats is great. Thanks a lot. Problem solved. Some php that does fancy sql for me presumably.

As a matter of interest, when the process completed, I got a message 'rebuilding cache' at the bottom of the page and it never finished (well not in 10 minutes anyway).

Is this a problem or a feature?
In reply to Brian Lockwood

Re: label file location

by Mauno Korpelainen -
Might be both but you may clear cache in any case... That should not cause any more problems.