From 6df07690e2c505cbdee044bdca0dcd3fe0f52cbe Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Mon, 13 Feb 2012 11:18:39 +0800 Subject: [PATCH] MDL-30911: mod_lesson: fix sub-heading level to be lower than lesson title. This issue is an improvement of accessibility compliance --- mod/lesson/pagetypes/branchtable.php | 3 ++- mod/lesson/view.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mod/lesson/pagetypes/branchtable.php b/mod/lesson/pagetypes/branchtable.php index 5b6cabd4b96..dffa778fbe4 100644 --- a/mod/lesson/pagetypes/branchtable.php +++ b/mod/lesson/pagetypes/branchtable.php @@ -110,7 +110,8 @@ class lesson_page_type_branchtable extends lesson_page { if ($this->lesson->slideshow) { $output .= $renderer->slideshow_start($this->lesson); } - $output .= $renderer->heading(format_string($this->properties->title)); + // We are using level 3 header because the page title is a sub-heading of lesson title (MDL-30911). + $output .= $renderer->heading(format_string($this->properties->title), 3); $output .= $renderer->box($this->get_contents(), 'contents'); $buttons = array(); diff --git a/mod/lesson/view.php b/mod/lesson/view.php index adf4ead4bb1..e0540b01cc6 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -391,7 +391,8 @@ if ($pageid != LESSON_EOL) { lesson_add_fake_blocks($PAGE, $cm, $lesson, $timer); echo $lessonoutput->header($lesson, $cm, $currenttab, $extraeditbuttons, $lessonpageid); if ($attemptflag) { - echo $OUTPUT->heading(get_string('attempt', 'lesson', $retries)); + // We are using level 3 header because attempt heading is a sub-heading of lesson title (MDL-30911). + echo $OUTPUT->heading(get_string('attempt', 'lesson', $retries), 3); } /// This calculates and prints the ongoing score if ($lesson->ongoing && !empty($pageid) && !$reviewmode) { @@ -415,7 +416,8 @@ if ($pageid != LESSON_EOL) { // Update the clock / get time information for this user add_to_log($course->id, "lesson", "end", "view.php?id=".$PAGE->cm->id, "$lesson->id", $PAGE->cm->id); - $lessoncontent .= $OUTPUT->heading(get_string("congratulations", "lesson")); + // We are using level 3 header because the page title is a sub-heading of lesson title (MDL-30911). + $lessoncontent .= $OUTPUT->heading(get_string("congratulations", "lesson"), 3); $lessoncontent .= $OUTPUT->box_start('generalbox boxaligncenter'); $ntries = $DB->count_records("lesson_grades", array("lessonid"=>$lesson->id, "userid"=>$USER->id)); if (isset($USER->modattempts[$lesson->id])) {