In my Moodle activity plugin I am trying to allow an admin to change strings from the settings of the plugin. The strings that should be changeable are: Teacher, Class and Student . These are used throughout my plugin.
I am undecided on the best method to do this as I am converting an old plugin and not sure what APIs I could use for Moodle 3.5. I am currently attempting it like this :
1 Admin can change strings in plugin settings
2 Storing values from settings into constants.
So far I am using php define statements but is there a recommended way to do this using Moodle's APIs. It seems there is when I look at some sample code but not too sure what to do.
Should I just proceed with the current method as it is working ?
Thanks,
Dan