Moodle Plugins directory: Custom fields for activity modules | Moodle.org
Custom fields for activity modules
Local plugins ::: local_modcustomfields
Maintained by
Daniel Neis Araujo
This plugin adds Custom Fields to all activity modules.
Latest release:
494 sites
107 downloads
27 fans
Current versions available: 1
This plugin adds Custom Fields to all activity modules.
Custom fields API was introduced in Moodle 3.7 and adds a standard way
to support this feature in many contexts.
With this plugin, the site admin can create fields at site level that
will be displayed on the forms of all activity modules.
Currently, there is only support to manage the fields and save their
data in each activity module for every course (it uses the course module
id).
In future we can display theses fields wherever we want.
Useful links
Contributors
Daniel Neis Araujo (Lead maintainer)
Please login to view contributors details and/or to contact them
https://gitlab.com/andrewdchancox/moodle-local_modcustomfields/-/tree/backupandrestore
I've just released a new version with you changes.
Best,
Daniel
It adds new filed at the end of settings tab as Other Fields
Can we add new field under Activity Completion section.
It doesn't make sense to have them under Activity Completion section as they are not related to this.
Best,
Daniel
I have added the plugin & created some custom fields to the my courses. But how should I fetch those fields for core_course_get_contents? Is there any way of adding those field without making any changes to CORE code of moodle?
You can use the handler from \local_modcustomfields\customfield\mod_handler::create(); to fetch the contents.
Unfortunately, there are not many places you can display this information without modifying the core code.
Best,
Daniel
I am trying to use the plugin in Moodle 3.10, but when I select the type of field, it shows me an error. The error is 'Section error!'.
I installed the plugin on two different Moodles and it showed me the same error. Can you help me with this, please?
Moodle 3.10 is too old, maybe the plugin is not really compatible anymore.
Please, update to 4.1, 4.2 or later and try again.
Best,
Daniel
You can install https://moodle.org/plugins/customfield_textregex and use a regular expression to allow only numbers to be entered.