Moodle plugins directory: Custom fields for activity modules | Moodle.org
Custom fields for activity modules
General plugins (Local) ::: local_modcustomfields
Maintained by Daniel Neis Araujo
This plugin adds Custom Fields to all activity modules.
Latest release:
350 sites
226 downloads
25 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
Unfortunately there is no such feature in this plugin.
Pull requests are welcome
Please, let me know if you find any issues.
I successfully installed this plugin.
How can i display custom field in api mod_quiz_get_quizzes_by_courses or core_course_get_contents
It seems that the setting "visible to" has no effect. I can set the field-value "everybody", but it never shows up when looking at the activity. Is there something I'm missing?
I use Moodle 4.1 with the boost template.
Regards, Marcel
The fields are not displayed anywhere.
You should modify the code for the plugins where you need them to be displayed.
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