Where does Moodle store homepage?

Where does Moodle store homepage?

by Jason R -
Number of replies: 5

Hello there,

I'm a PHP developer but new to the world of Moodle.

I have a few pages in a moodle VLE which I need to edit content manually. I've discovered that when a page has been created, it's stored in the database (moodle > mdl_page) - this information can be edited manually and it's fine.

However, i'm not sure where moodle stores the content for the "home page". It doesn't appear to be in the mdl_page table.

Thanks for your help,

Cheers.

 

smile

Average of ratings: -
In reply to Jason R

Re: Where does Moodle store homepage?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hello there. I'm not a developer but  until one comes along... what exactly do you want to change in the "home page" that you can't change by logging in as admin to the Moodle site and turning on the editing? (Or else, for language strings, by going to Settings>Site administration>Language>Language customisation?

In reply to Mary Cooch

Re: Where does Moodle store homepage?

by Jason R -

Hello, thanks for the reply. There's two reasons really:

Basically, I need to update this content dynamically on a scheduled basis, using a custom PHP script.

It's also extra useful, as I've noticed when inputting javascript using the WYSIWYG editor (in HTML mode), it sometimes breaks the code. I have a specific page which uses javascript and <style> tags which when editing using moodle itself, moodle seems to delete all code within the style tags. Editing the pages directly in the database is a workaround for that issue.

In reply to Jason R

Re: Where does Moodle store homepage?

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Your best bet may be to incorporate your changes into the layout file for the frontpage in the theme you are using.

Create an area on the page for your dynamic content and use the javascript/yui from the theme rather than trying to include it through the html editor.

Richard

In reply to Richard Oelmann

Re: Where does Moodle store homepage?

by Jenny Gray -

Or alternatively you could add all your dynamic content in a block, and then add a new region in your theme to display a block in the central part of the layout.