Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Installation
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      33581

      Description

      The idea is to allow admins to place a special xml file in moodledata dir, this file would override the settings default in distribution - examples: default for secondary schools, FERPA recommended, crazy_20_setup, etc.
      This could be also help with managing of large scale installations like MoodleRooms.

        Activity

        Hide
        Petr Škoda added a comment -

        implemented - defaults can now be stored in /local/defaults.php,
        the expected format of this file is
        $dafaults['pluginname']['settingname'] = 'settingvalue'; //for plugins
        $dafaults['moodle']['settingname'] = 'settingvalue'; //for core settings

        Show
        Petr Škoda added a comment - implemented - defaults can now be stored in /local/defaults.php, the expected format of this file is $dafaults ['pluginname'] ['settingname'] = 'settingvalue'; //for plugins $dafaults ['moodle'] ['settingname'] = 'settingvalue'; //for core settings
        Hide
        Andrea Bicciolo added a comment -

        Hi Petr, it is unclear to me the advantage of such defaults.php: this file looks like it changes the Default value shown in Admin pages, but it does not seems to affect the setting itself. For example:

        $defaults['moodle']['cronclionly'] = 1;

        It changes the Default value displayed, but does not set the cron from cli command only, so the cron can still be run from http requests. I also tested forceloginforprofiles, profilesforenrolledusersonly, registerauth and many other settings.
        None of the values inserted in defaults.php changed the settings, the only value changed is the "Default: xx" text.

        Probably I'm missing something? Are those defaults set only during setup ? As far as I can understand, defaults.php cannot substitute $CFG->somesetting in config.php, something very handy if you need to mass-change settings on large deployments.

        Show
        Andrea Bicciolo added a comment - Hi Petr, it is unclear to me the advantage of such defaults.php: this file looks like it changes the Default value shown in Admin pages, but it does not seems to affect the setting itself. For example: $defaults ['moodle'] ['cronclionly'] = 1; It changes the Default value displayed, but does not set the cron from cli command only, so the cron can still be run from http requests. I also tested forceloginforprofiles, profilesforenrolledusersonly, registerauth and many other settings. None of the values inserted in defaults.php changed the settings, the only value changed is the "Default: xx" text. Probably I'm missing something? Are those defaults set only during setup ? As far as I can understand, defaults.php cannot substitute $CFG->somesetting in config.php, something very handy if you need to mass-change settings on large deployments.
        Hide
        Petr Škoda added a comment -

        Reclosing, it is intended to change the defaults, the uses are
        1/ installation
        2/ upgrades
        3/ informing admins - specifies recommended settings

        You are supposed to set these defaults before installation or upgrade. For changing of values you need to write php script. If you want to enforce settings you need to modify config.php. It is nto yet possible to force plugin settings, it should be implemented later in 2.0dev.

        Petr

        Show
        Petr Škoda added a comment - Reclosing, it is intended to change the defaults, the uses are 1/ installation 2/ upgrades 3/ informing admins - specifies recommended settings You are supposed to set these defaults before installation or upgrade. For changing of values you need to write php script. If you want to enforce settings you need to modify config.php. It is nto yet possible to force plugin settings, it should be implemented later in 2.0dev. Petr

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: