General developer forum

Adding coustom field in moodle course

 
Picture of gulshan pal
Adding coustom field in moodle course
 

Hello  to all

I am new to moodle i want to add a custom field while adding a course i.e when we add courses to moodle i want to add a price field so that a user can add  price of that course at same time  but i want to add that field without disturbing the core files of moodle.  

Thanks in advance.

 
Average of ratings: -
Picture of Dave Balch
Re: Adding coustom field in moodle course
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developers

Hi,

It's best to avoid modifying the core Moodle files and database. Probably the best way to do what you want is to make an enrolment plugin. Looking at the Paypal plugin might help: https://docs.moodle.org/33/en/PayPal_enrolment

You'll want to look at the developer docs (If you haven't already): https://docs.moodle.org/dev/Enrolment_plugins

Cheers,
Dave.

 
Average of ratings: -
Picture of Tomasz Muras
Re: Adding coustom field in moodle course
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Translators

You can also try to use custom metadata plugin.

Tomek

 
Average of ratings: -