MDL-36591 Assignment - rewrite image urls in online text summaries
authorDamyon Wiese <damyon@moodle.com>
Wed, 28 Nov 2012 02:04:18 +0000 (10:04 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 28 Nov 2012 02:18:01 +0000 (10:18 +0800)
mod/assign/submission/onlinetext/locallib.php

index a94cc85..e9240fa 100644 (file)
@@ -226,7 +226,12 @@ class assign_submission_onlinetext extends assign_submission_plugin {
         $showviewlink = true;
 
         if ($onlinetextsubmission) {
-            $text = format_text($onlinetextsubmission->onlinetext, $onlinetextsubmission->onlineformat, array('context'=>$this->assignment->get_context()));
+            $text = $this->assignment->render_editor_content(ASSIGNSUBMISSION_ONLINETEXT_FILEAREA,
+                                                             $onlinetextsubmission->submission,
+                                                             $this->get_type(),
+                                                             'onlinetext',
+                                                             'assignsubmission_onlinetext');
+
             $shorttext = shorten_text($text, 140);
             $plagiarismlinks = '';
             if (!empty($CFG->enableplagiarism)) {