]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19077 heading() - level is now optional, defaulting to 2
authorstronk7 <stronk7>
Thu, 6 Aug 2009 10:02:41 +0000 (10:02 +0000)
committerstronk7 <stronk7>
Thu, 6 Aug 2009 10:02:41 +0000 (10:02 +0000)
lib/outputlib.php

index 8b9adba68f9f97d60e7f96910bd6c76e524de540..63145e81d33617e9a865c4fc2557b1d6ef7d945a 100644 (file)
@@ -3437,12 +3437,12 @@ class moodle_core_renderer extends moodle_renderer_base {
     /**
      * Outputs a heading
      * @param string $text The text of the heading
-     * @param int $level The level of importance of the heading
+     * @param int $level The level of importance of the heading. Defaulting to 2
      * @param string $classes A space-separated list of CSS classes
      * @param string $id An optional ID
      * @return string the HTML to output.
      */
-    public function heading($text, $level, $classes = 'main', $id = '') {
+    public function heading($text, $level = 2, $classes = 'main', $id = '') {
         $level = (integer) $level;
         if ($level < 1 or $level > 6) {
             throw new coding_exception('Heading level must be an integer between 1 and 6.');