Insert php code into moodle 2.6

Avatar
  • Answered
Dear all,
I want to insert php code into moodle 2.6, specially in question bank. Can someone help me to how I have to do?
Thanks in advance.
Avatar
BradM
Hi khongten - I did some research to find out if you can use php within Moodle and I found the following page: Loading custom HTML forms and PHP scripts into Moodle In that forum thread, Timothy Takemoto says: I think that you would need to hack moodle to add php. If you can write php then it should not be so difficult for you to add some php into the relevant part of moodle. It does not appear that Moodle supports adding php code to your questions / etc. However, they do suggest using iframes to show pages with php code in them. This thread as well suggests using iframes, so that may be the most common solution when it comes to adding custom php code to Moodle.