MDL-36591 Assignment - rewrite image urls in online text summaries
[moodle.git] / 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)) {