Storing configuration data
Having agreed with the client what the configuration screen is going to look like, we need to decide what information we need to store in the database to support these options. Our dual language plugin is a site administration plugin and so let's use the Admin settings API to store and retrieve the plugin's configuration data--see https://docs.moodle.org/dev/Admin_settings.
Because they are meant for functionality that doesn't quite fit the typical categories of a plugin, local plugins are a good place to gain an understanding of the interaction between frontend and backend APIs, as we are allowed to be flexible with the APIs we can experiment with.
In Eclipse, under /local/duallang, create a new file called settings.php ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access