From: stronk7 Date: Thu, 6 Aug 2009 10:02:41 +0000 (+0000) Subject: MDL-19077 heading() - level is now optional, defaulting to 2 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4ecbf8568b30203692459eb89fe636b4f033b51c;p=moodle.git MDL-19077 heading() - level is now optional, defaulting to 2 --- diff --git a/lib/outputlib.php b/lib/outputlib.php index 8b9adba68f..63145e81d3 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -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.');