mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-55957 workshop: Fix the embedded files serving
There was a bug with serving the files from the areas instructauthors, instructreviewers and conclusion. These three areas should not use the itemid in the plugininfo URLs. But they did use 0 as the itemid which broke the file previews when browsing via server files repository. The first part of the patch fixes all relevant calls to file_rewrite_pluginfile_urls() so that null is now properly used instead of zero. The second part of the fix is that we no longer delete the first $args element in the workshop_pluginfile() function - the itemid is not supposed to appear there now. The last part of the patch is that instead of repeating the same code block copy&pasted for each file area in workshop_pluginfile(), we now have a single block covering them all.
- Loading branch information
Showing
6 changed files
with
9 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters