Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-57896

CLI wrapper for get_config() and set_config() methods

XMLWordPrintable

      There are situations when we need to get/set moodle configuration variables from external scripts, most notably shell scripts, in a clean way. I've seen various hackery, such as text parsing of version.php or config.php, just to get access to elementary $CFG data (such as DB access credentials or dataroot path).

      Another typical example is the issue with mdk where we would benefit from the ability to set the site theme without hard-coding it in config.php - https://github.com/FMCorz/mdk/issues/147

      Automated post-installation scripts could profit of the ability to configure the site, too.

      It was discussed today in the telegram devchat https://moodle.org/local/chatlogs/index.php?conversationid=20351#c618745 and concluded that we basically need a simple CLI wrapper around the core get_config() and set_config() functions.

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.