Turning off html editor and javascript

Turning off html editor and javascript

by uday ramakrishna -
Number of replies: 2

Hi All

We are using moodle 1.7 and we would like to use some jump menus on the front page using javascript. The big problem is that unless we turn off the html editor which is a good feature to have we are unable to add the jump menu. The problem is that javascript funtion calls are being converted to function anonymous and this cascades with every click and stops working after a few clicks. Is there any location where we can add something to get this to work so we can re-introduce the html editor? We tried weblib.php but it was not there.

Is there also a way to run php code in this editor and be able to display stuff based on the role? i.e pull department and display content based on active directory details?

Best Regards

Uday

Average of ratings: -
In reply to uday ramakrishna

Re: Turning off html editor and javascript

by Mauno Korpelainen -

Hi Uday,

there is a way to run php with editor: iframe tags

Open your editor, press <> and try a code like

<iframe
src ="http://yoursite.com/moodle/file.php/1/somescript.php"
width="100%">
</iframe>

Have you tried to add your menu to your theme header.html?

In reply to Mauno Korpelainen

Re: Turning off html editor and javascript

by uday ramakrishna -

Hi Mauno,

Thanks very much for responding on this but I was hoping there would be some way to render the html itself without having to add the iframe so I could query the database/ldap directly on the page. Thanks again.

Best Regards

Uday