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

Small re-write to use relative paths instead of absolute paths in "mod_url" onclick events. Allowing for domain aliases.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.13, 3.4.4, 3.5.1
    • Fix Version/s: None
    • Component/s: Course, Resource
    • Labels:
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE

      Description

      For Moodle sites with multiple domains/aliases, "mod_url" onclick events cache the absolute URL.

      In cases where a site has multiple domains i.e. for different customers or campuses, but the same moodle installation. This is an issue.

      It means that when a user visits "a.moodle.site" any cached links displayed on "b.moodle.site" will link to "a.moodle.site". This looks inconsistent and forces the user to login again.

       

      Steps to reproduce:

      1. Create a standard moodle installation.
      2. Setup the installation on both a.moodle.site and b.moodle.site(as an alias)
      3. Open a course on "a.moodle.site" and observe that the "onclick" events are all for "a.moodle.site"
      4. Open the same course on "b.moodle.site", observe that "onclick" events contain "a.moodle.site"

      I have created a fix for this here: https://github.com/LoneBeta/moodle/commit/9fb1e689092d7e3202d0e29e255f526a6ea70eed.patch

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andrewavado Andrew Turnbull
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: