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.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

Daniel Neis Araujo (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Andrew Hancox
    Tue, 4 July 2023, 8:42 PM
    I've just raised a merge request to add back-up and restore functionality:
    https://gitlab.com/andrewdchancox/moodle-local_modcustomfields/-/tree/backupandrestore
  • Daniel Neis Araujo
    Tue, 4 July 2023, 10:35 PM
    Thank you very much, Andrew!
    I've just released a new version with you changes.
    Best,
    Daniel
  • Santosh Jagtap
    Tue, 25 July 2023, 3:13 PM
    Hi, This plugin really helpful.
    It adds new filed at the end of settings tab as Other Fields
    Can we add new field under Activity Completion section.
  • Daniel Neis Araujo
    Sat, 5 Aug 2023, 4:37 AM
    The fields will appear under sections with the name you give when you create the fields's categories.
    It doesn't make sense to have them under Activity Completion section as they are not related to this.
    Best,
    Daniel
  • Santosh Jagtap
    Tue, 12 Sept 2023, 7:59 PM
    Can anyone here confirm whether database tables get deleted while un-installing this plugin?
  • Daniel Neis Araujo
    Fri, 22 Sept 2023, 1:55 AM
    No tables are deleted as the plugin don't have any tables.
  • Dhawal Mhatre
    Thu, 23 Nov 2023, 7:39 PM
    Hi,

    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?
  • Daniel Neis Araujo
    Fri, 22 Dec 2023, 1:52 AM
    Hello, Dhawal
    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
  • CRISTIAN DAVID VARGAS BERMUDEZ
    Mon, 6 May 2024, 11:41 PM
    Hello 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?
  • Daniel Neis Araujo
    Tue, 7 May 2024, 12:11 AM
    Hello, Cristian
    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
  • Juan Carlos Galdos
    Thu, 20 June 2024, 4:45 PM
    Congratulations with this amazing plugin. It should be great to make some field categories visible also for students, like the General category on the activities.
  • Laurent Dairaine
    Sat, 19 Oct 2024, 9:27 PM
    Hi Daniel. Thanks for this plugin. Is there any way to get and display the defined fields in GENERICO ?
  • Martin Mastny
    Mon, 21 Oct 2024, 8:05 PM
    Hi Daniel, great and useful plugin. Thank you. Do you think that it would be possible (hypothetically) to edit the plugin, so that certain fields would appear at certain modules, or even better, certain field categories would appear at certain modules and not others?
  • Cuong Nguyen Viet
    Wed, 2 Apr 2025, 12:45 PM
    Hi Daniel and everyone. I want add custom field name "Training LOE" with type number, but i see only date and text type. Can I custom the field to number?
  • Daniel Neis Araujo
    Fri, 25 Apr 2025, 12:51 AM
    Hello,
    You can install https://moodle.org/plugins/customfield_textregex and use a regular expression to allow only numbers to be entered.
1 2
Please login to post comments