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

Frontpage settings incorrectly display config.php

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-75937-400
    • MDL-75937-401
    • MDL-75937-master
    • Hide

      Prerequisites

      1. Open two tabs for site home page and <wwwroot>/admin/settings.php?section=frontpagesettings

      Testing the fullname

      1. Login as admin
      2. Go to <wwwroot>/admin/settings.php?section=frontpagesettings
      3. Set "Full site name" to "non-forced fullname" then save the changes
      4. Open config.php file in your root folder
      5. add "$CFG->fullname = 'forced fullname';" then save the file
      6. Back to settings page
      7. Verify that the fullname has been overridden to 'forced fullname' and you cannot edit the value
      8. Go to site home page tab
      9. Verify that the fullname in the main header has been overridden as well

      Testing the shortname

      1. Login as admin
      2. Go to <wwwroot>/admin/settings.php?section=frontpagesettings
      3. Set "Short name for site (eg single word)" to "non-forced shortname" then save the changes
      4. Open config.php file in your root folder
      5. add "$CFG->shortname = 'forced shortname';" then save the file
      6. Back to settings page
      7. Verify that the shortname has been overridden to 'forced shortname' and you cannot edit the value
      8. Go to site home page tab
      9. Verify that the shortname in the content header has been overridden as well

      Testing the summary

      1. Login as admin
      2. Go to <wwwroot>/admin/settings.php?section=frontpagesettings
      3. Set "Front page summary" to "non-forced summary" then save the changes
      4. Open config.php file in your root folder
      5. add "$CFG->summary = 'forced summary';" then save the file
      6. Back to settings page
      7. Verify that the summary has been overridden to 'forced summary' and you cannot edit the value
      8. Go to site home page tab
      9. View source code and search for meta tag with name of "description"
      10. Verify that the content has been overridden
      Show
      Prerequisites Open two tabs for site home page and <wwwroot>/admin/settings.php?section=frontpagesettings Testing the fullname Login as admin Go to <wwwroot>/admin/settings.php?section=frontpagesettings Set "Full site name" to "non-forced fullname" then save the changes Open config.php file in your root folder add "$CFG->fullname = 'forced fullname';" then save the file Back to settings page Verify that the fullname has been overridden to 'forced fullname' and you cannot edit the value Go to site home page tab Verify that the fullname in the main header has been overridden as well Testing the shortname Login as admin Go to <wwwroot>/admin/settings.php?section=frontpagesettings Set "Short name for site (eg single word)" to "non-forced shortname" then save the changes Open config.php file in your root folder add "$CFG->shortname = 'forced shortname';" then save the file Back to settings page Verify that the shortname has been overridden to 'forced shortname' and you cannot edit the value Go to site home page tab Verify that the shortname in the content header has been overridden as well Testing the summary Login as admin Go to <wwwroot>/admin/settings.php?section=frontpagesettings Set "Front page summary" to "non-forced summary" then save the changes Open config.php file in your root folder add "$CFG->summary = 'forced summary';" then save the file Back to settings page Verify that the summary has been overridden to 'forced summary' and you cannot edit the value Go to site home page tab View source code and search for meta tag with name of "description" Verify that the content has been overridden
    • 6
    • Team Hedgehog Sprint 1.2, Team Hedgehog 2023 Sprint 1.3

    Description

      On the Site administration Front page settings page, the specific settings which are written to the course table and not the config table will incorrectly display an 'Overridden in config.php' when overridden, however they are not displaying the override (in the case of the summary text editor), and they are not respected in the frontpage displayed to users. There is also some weirdness with elements like checkboxes that become disabled, but can be overridden by removing the 'disabled' html attribute and submitting a new value, which will make that value become applied, as the override is ignored.

      As per MDL-28727, the ignored override is intended behaviour, but the settings page display of 'overridden in config.php' is misleading.

      /admin/settings.php?section=frontpagesettings

      To reproduce:

      On frontpage settings, set summary to 'non-forced'.

      In config.php, set $CFG->summary = 'forced';

      Reload frontpage settings, observe 'summary' states overriden, but displays 'non-forced'

       

       

      Attachments

        Activity

          People

            stevani.andolo@moodle.com Stevani Andolo
            peterburnett Peter Burnett
            David Woloszyn David Woloszyn
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week
                1w