Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
98e8c0c7
Commit
98e8c0c7
authored
Sep 10, 2012
by
Ankit Agarwal
Browse files
MDL-33198 book: Adding h tags to book title to increase accessibility
parent
6f51394b
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/book/view.php
View file @
98e8c0c7
...
...
@@ -181,11 +181,12 @@ if (!$book->customtitles) {
$hidden
=
$chapter
->
hidden
?
'dimmed_text'
:
''
;
if
(
!
$chapter
->
subchapter
)
{
$currtitle
=
book_get_chapter_title
(
$chapter
->
id
,
$chapters
,
$book
,
$context
);
echo
'<p class="
book_chapter_title '
.
$hidden
.
'">'
.
$currtitle
.
'</p>'
;
echo
$OUTPUT
->
heading
(
$currtitle
,
2
,
array
(
'class'
=>
'
book_chapter_title '
.
$hidden
))
;
}
else
{
$currtitle
=
book_get_chapter_title
(
$chapters
[
$chapter
->
id
]
->
parent
,
$chapters
,
$book
,
$context
);
$currsubtitle
=
book_get_chapter_title
(
$chapter
->
id
,
$chapters
,
$book
,
$context
);
echo
'<p class="book_chapter_title '
.
$hidden
.
'">'
.
$currtitle
.
'<br />'
.
$currsubtitle
.
'</p>'
;
echo
$OUTPUT
->
heading
(
$currtitle
,
2
,
array
(
'class'
=>
'book_chapter_title '
.
$hidden
));
echo
$OUTPUT
->
heading
(
$currsubtitle
,
3
,
array
(
'class'
=>
'book_chapter_title '
.
$hidden
));
}
}
$chaptertext
=
file_rewrite_pluginfile_urls
(
$chapter
->
content
,
'pluginfile.php'
,
$context
->
id
,
'mod_book'
,
'chapter'
,
$chapter
->
id
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment