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

Create three new config settings to add static HTML to the every page.

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      After talking with Martin and Jordan about the best way to include Google Analytics code within Moodle installs in a theme independent method it was decided that the easiest way presently would be to introduce three new config settings that would be inspected and then echoed into the page at appropraite points.
      This way the site admin could easily copy/paste such JS or HTML into the config settings and know that no matter what theme or page is being used it will be added.

      Cheers
      Sam

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            samhemelryk Sam Hemelryk added a comment -

            Hi guys,

            I've just attached a patch that adds the following three settings:

            1. $CFG->additionalhtmlhead
            2. $CFG->additionalhtmltopofbody
            3. $CFG->additionalhtmlfooter

            These three settings allow you (through the admin interfaces) set additional HTML that will be included on every page for 3 locations, within the HEAD tag, immediately after the body tag has been opened and then immediately before it is going to be closed.

            If we are certain this is the way we want to go could someone please review this for me.
            I should add the actual commit will include a version number bump so that people see that new settings.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Hi guys, I've just attached a patch that adds the following three settings: $CFG->additionalhtmlhead $CFG->additionalhtmltopofbody $CFG->additionalhtmlfooter These three settings allow you (through the admin interfaces) set additional HTML that will be included on every page for 3 locations, within the HEAD tag, immediately after the body tag has been opened and then immediately before it is going to be closed. If we are certain this is the way we want to go could someone please review this for me. I should add the actual commit will include a version number bump so that people see that new settings. Cheers Sam
            Hide
            skodak Petr Skoda added a comment -

            thanks! Looks ok to me, please ask for one more +1 from Martin or Eloy.

            Show
            skodak Petr Skoda added a comment - thanks! Looks ok to me, please ask for one more +1 from Martin or Eloy.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Hi Eloy,

            just added you as a watcher, if this hasn't been commit by the time you come online could you please review the attached patch for me

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Hi Eloy, just added you as a watcher, if this hasn't been commit by the time you come online could you please review the attached patch for me Cheers Sam
            Hide
            jtomkinson Jordan Tomkinson added a comment -

            +1

            Show
            jtomkinson Jordan Tomkinson added a comment - +1
            Hide
            dougiamas Martin Dougiamas added a comment -

            Looks fine to me! +1

            Show
            dougiamas Martin Dougiamas added a comment - Looks fine to me! +1
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks for looking guys, I've commit the patch now.
            Jordan when you next CVS you should have the settings and will be able to use it to add the Google Analytics stuff for Tomaz.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks for looking guys, I've commit the patch now. Jordan when you next CVS you should have the settings and will be able to use it to add the Google Analytics stuff for Tomaz.

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Dec/10