Using PHP within "toggle html source"

Using PHP within "toggle html source"

by flo jo -
Number of replies: 2
Can anyone tell me if it's possible to enable a setting somewhere that will let us use PHP code amongst HTML in an HTML block or label?
Some background: We have been using a center block linked to an RSS feed to display news articles on the front page of moodle, however the center block was causing problem in courses whereby blocks would diappear if you tried to move one from right to left - I'd rather not have to put the center block back unless I completely have to so I'd like to be able to code in our own custom RSS system. But this PHP not being recognised is a problem. Does anyone have any ideas?smile
Many thanks!
Jo
Average of ratings: -
In reply to flo jo

Re: Using PHP within "toggle html source"

by flo jo -
*bump* Is anyone able to help me with this?
In reply to flo jo

Re: Using PHP within "toggle html source"

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
It's not possible to input php via the Moodle web interface. This would be an interesting feature, but it would also be a massive security issue.

I'm not too sure exactly of what you're trying to do (must be cuz it's getting late in the day), but...

Coding a block is not so complicated, especially since you seem to know (a bit of?) php. Have a look at http://cvs.moodle.org/contrib/plugins/blocks/NEWBLOCK/ for the basic block code (this one also has documentation on how to build a block). Hopefully you can come up with something that can also be share with the rest of us.. smile

Mat