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

Portfolio export of embedded images as link

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.6.2
    • Portfolio
    • MOODLE_26_STABLE

      I have discovered this while working on MDL-45256. The current design and implementation of portfolio_rewrite_pluginfile_urls() does not seem to be quite correct. Even if portfolio_rewrite_pluginfile_url_callback() suggests that the href attribute is supported, it's actually working well for images only.

      Steps to reproduce

      • Enable File download portfolio
      • Create a forum post with the sentence like

        Click here to download the image.
        

      • Make sure the "here" word acts as a link to embedded file.
      • Export the post to portfolio (File download).

      Expected result:
      ZIP with the post HTML and embedded files stored in the "site_files" folder is downloaded. The "here" link is still there, referring to the file in the site_files (relative URL).

      Actual result:
      The "here" link is completely replaced with a code like

      Click <img href="@@PLUGINFILE@@/image.png" src="site_files/image.png"/>  to download the image.
      

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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