Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.3
-
Fix Version/s: None
-
Component/s: Portfolio
-
Testing Instructions:
- Create a glossary entry with an image in the description
- The image name has to contain unicode characters
- Export the entry to a portfolio e.g. file download
- Check that the file is exported
-
Affected Branches:MOODLE_23_STABLE
Description
- Create a glossary entry with an image in the description
- The image name has to contain unicode characters
- Export the entry
Expected
- The file is exported
Actual
- An exception is raised because the file is not found
This patch should solve the issue:
diff --git a/lib/portfoliolib.php b/lib/portfoliolib.php
|
index dc7473a..aa9d8b4 100644
|
--- a/lib/portfoliolib.php
|
+++ b/lib/portfoliolib.php
|
@@ -1253,6 +1253,7 @@ function portfolio_rewrite_pluginfile_url_callback($contextid, $component, $file
|
return $matches;
|
}
|
$filename = substr($attributes[$key], strpos($attributes[$key], '@@PLUGINFILE@@') + strlen('@@PLUGINFILE@@'));
|
+ $filename = urldecode($filename);
|
$filepath = '/';
|
if (strpos($filename, '/') !== 0) {
|
$bits = explode('/', $filename);
|
Although, this does not solve UTF8 encoding in zip files: MDL-24928