Skip to content

Commit

Permalink
Merge branch 'mdl24_MDL-29004_wiki-fix-images-in-printer-friendly-vie…
Browse files Browse the repository at this point in the history
…w' of https://github.com/brki/moodle into MOODLE_24_STABLE
  • Loading branch information
Damyon Wiese committed Aug 26, 2013
2 parents cd118a2 + 07b2488 commit 1e27536
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mod/wiki/pagelib.php
Expand Up @@ -2206,8 +2206,14 @@ private function print_pretty_view() {

$content = wiki_parse_content($version->contentformat, $version->content, array('printable' => true, 'swid' => $this->subwiki->id, 'pageid' => $this->page->id, 'pretty_print' => true));

$html = $content['parsed_text'];
$id = $this->subwiki->wikiid;
if ($cm = get_coursemodule_from_instance("wiki", $id)) {
$context = context_module::instance($cm->id);
$html = file_rewrite_pluginfile_urls($html, 'pluginfile.php', $context->id, 'mod_wiki', 'attachments', $this->subwiki->id);
}
echo '<div id="wiki_printable_content">';
echo format_text($content['parsed_text'], FORMAT_HTML);
echo format_text($html, FORMAT_HTML);
echo '</div>';
}
}
Expand Down

0 comments on commit 1e27536

Please sign in to comment.