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

Portfolio export of embedded images as link

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.2
    • Fix Version/s: None
    • Component/s: Portfolio
    • Labels:
    • Affected Branches:
      MOODLE_26_STABLE

      Description

      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.
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mudrd8mz David Mudrák (@mudrd8mz)
                Reporter:
                mudrd8mz David Mudrák (@mudrd8mz)
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: