MDL-31936 workshop: Fix overall feedback content processing order
authorDavid Mudrák <david@moodle.com>
Wed, 17 Sep 2014 21:36:13 +0000 (23:36 +0200)
committerDavid Mudrák <david@moodle.com>
Fri, 3 Oct 2014 08:46:32 +0000 (10:46 +0200)
This is unrelated to the issue but was spotted while testing it. The order of
format_text() and file_rewrite_pluginfile_urls() was incorrect and threw
debugging message. Fixed now.

mod/workshop/locallib.php

index ed2ee78..9c314dd 100644 (file)
@@ -3531,10 +3531,10 @@ class workshop_assessment extends workshop_assessment_base implements renderable
             return null;
         }
 
-        $content = format_text($this->feedbackauthor, $this->feedbackauthorformat,
-            array('overflowdiv' => true, 'context' => $this->workshop->context));
-        $content = file_rewrite_pluginfile_urls($content, 'pluginfile.php', $this->workshop->context->id,
+        $content = file_rewrite_pluginfile_urls($this->feedbackauthor, 'pluginfile.php', $this->workshop->context->id,
             'mod_workshop', 'overallfeedback_content', $this->id);
+        $content = format_text($content, $this->feedbackauthorformat,
+            array('overflowdiv' => true, 'context' => $this->workshop->context));
 
         return $content;
     }