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

CLI wrapper for get_config() and set_config() methods

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mudrd8mz David Mudrák (@mudrd8mz)
              Reporter:
              mudrd8mz David Mudrák (@mudrd8mz)
              Peer reviewer:
              Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Andrew Nicols
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/17