InMotion Hosting Support Center

Insert php code into moodle 2.6

Category: Moodle

2013-12-21 12:59 pm EST

Hits: 2,769
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.

You must login before you can ask a follow up question.

You must login before you can submit an answer.



5,399 Points
2013-12-23 10:33 am EST
Hi khongten - I did some research to find out if you can use php within Moodle and I found the following page:

<a href='' target='_blank'>Loading custom HTML forms and PHP scripts into Moodle</a>

In that forum thread, Timothy Takemoto says:
<em>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. </em>

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. <a href='' target='_blank'>This thread</a> as well suggests using iframes, so that may be the most common solution when it comes to adding custom php code to Moodle.

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!