General developer forum

 
 
Picture of Raphael Goldman
Adding new fields to the Common module settings
 

Hello,

I need to add some fields to the Block of "Common module settings",

Does anyone knows where can I find any tutorials/guide about it?

I am very new to moodle, and will be glad to get any help.

Thanks,

Raphael

 
Average of ratings: -
Picture of Jitendra Gaur
Re: Adding new fields to the Common module settings
 
Average of ratings: -
Picture of Raphael Goldman
תשובה ל: Re: Adding new fields to the Common module settings
 

Under the "Common module settings" in each course and even in each lesson/activity

I would like to add my own custom fields, can someone please guide me where should I start from?

I will need also to add anew table to the DB of course.

Thanks

 
Average of ratings: -
Picture of Jitendra Gaur
Re: תשובה ל: Re: Adding new fields to the Common module settings
 

Hi,

There is no api to directly add column to course for that you need to create a enrolment plugin and in enrolment plugin's lib file there is function called course_edit_form(). There you can add your column and logic to save the data use function course_updated().

For best help look in moodle default plugin's code like moodle_code/enrol/paypal

Enjoy!

 
Average of ratings: -
Picture of Raphael Goldman
תשובה ל: Re: תשובה ל: Re: Adding new fields to the Common module settings
 

Hi,

Add if I want to add another block like the "Common module settings" with my own fields,

I will want also that block to be displayed each time that the Common modle settings block,

is displayed,

Thanks,

 

Raphael

 
Average of ratings: -