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

Add proper setup of course $CFG variables, fix use of global $COURSE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: General
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      While fixing loginhttps I have noticed several problems related to course themes and languages, the problem is in incorrect use of global $COURSE and $course and theme setup. For example the themes were setup up in print_header() but sometimes $CFG->pix and other variables were used before the print_header() which resulted in pictures without https on pages that required https.

      I am about to commit patch that creates new course_setup() function that sets up all course related global $CFG variables, changes locale and setups themes. These tasks are now in several places (setup.php, print_header()). It is called first from setup.php to set up default site theme and locale and then from require_login() to change it to course settings if present.

      I have also found several other forgotten global $course issues...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                skodak Petr Skoda
                Tester:
                Nobody
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  31/Mar/07