Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-29004 Wiki: display images in printer-friendly view

  • Loading branch information...
commit 07b248886d94c1c6016534c5dd6737a36349be0f 1 parent ea3f5b5
brki brki authored

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. +7 1 mod/wiki/pagelib.php
8 mod/wiki/pagelib.php
@@ -2206,8 +2206,14 @@ private function print_pretty_view() {
2206 2206
2207 2207 $content = wiki_parse_content($version->contentformat, $version->content, array('printable' => true, 'swid' => $this->subwiki->id, 'pageid' => $this->page->id, 'pretty_print' => true));
2208 2208
  2209 + $html = $content['parsed_text'];
  2210 + $id = $this->subwiki->wikiid;
  2211 + if ($cm = get_coursemodule_from_instance("wiki", $id)) {
  2212 + $context = context_module::instance($cm->id);
  2213 + $html = file_rewrite_pluginfile_urls($html, 'pluginfile.php', $context->id, 'mod_wiki', 'attachments', $this->subwiki->id);
  2214 + }
2209 2215 echo '<div id="wiki_printable_content">';
2210   - echo format_text($content['parsed_text'], FORMAT_HTML);
  2216 + echo format_text($html, FORMAT_HTML);
2211 2217 echo '</div>';
2212 2218 }
2213 2219 }

0 comments on commit 07b2488

Please sign in to comment.
Something went wrong with that request. Please try again.