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

target="_top" not included for activity autolinks in file resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.8.6, 1.9, 1.9.1, 1.9.2
    • Resource
    • None
    • Moodle 1.8.6 (Build: 20080730)
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      The frametarget() added to /lib/weblib.php in http://cvs.moodle.org/moodle/lib/weblib.php?r1=1.735&r2=1.736 silently drops any use of _top as a frame target, as per http://tracker.moodle.org/browse/MDL-8050 .

      To reproduce:
      1. Create an activity, e.g. a forum
      2. Create an HTML file including the text of the above resource
      3. Upload the HTML file and link it as a file resource, opening in same window with navigation visible
      4. Ensure activity autolinking is enabled
      5. View the HTML resource
      6. Click on the autolink

      Expected result:
      Activity loads with one set of navigation.

      Actual result:
      Activity loads with two sets of navigation, as it has loaded the activity with it's own navigation into the existing content frame.

      I don't know how determined the plan to move to XHTML strict is, but until all the file resources are loaded into iframes, the target attribute should be kept functional.

      Patch to allow frametarget() to return target="_top" attached.

            moodle.com Moodle HQ
            balchd Dave Balch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.