Saving a form as a public template
[moodle.git] / grade / grading / renderer.php
index 173f07b..526f4a5 100644 (file)
@@ -66,6 +66,18 @@ class core_grading_renderer extends plugin_renderer_base {
         return html_writer::link($url, $img . $txt, array('class' => 'action'));
     }
 
+    /**
+     * Renders a message for the user, typically as an action result
+     *
+     * @param string $message
+     * @return string
+     */
+    public function management_message($message) {
+        $this->page->requires->strings_for_js(array('clicktoclose'), 'core_grading');
+        $this->page->requires->yui_module('moodle-core_grading-manage', 'M.core_grading.init_manage');
+        return $this->output->box(format_string($message).html_writer::tag('span', ''), 'message', 'actionresultmessagebox');
+    }
+
     /**
      * Renders the common information about the form definition
      *