mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-43730 mod_book: Make chapter action links accessible
This commit is contained in:
parent
8f06fffbe1
commit
22255d8c78
@ -45,11 +45,17 @@ If the custom titles checkbox is ticked, the chapter title is NOT displayed as a
|
||||
$string['chapters'] = 'Chapters';
|
||||
$string['chaptertitle'] = 'Chapter title';
|
||||
$string['content'] = 'Content';
|
||||
$string['deletechapter'] = 'Delete chapter "{$a}"';
|
||||
$string['editingchapter'] = 'Editing chapter';
|
||||
$string['eventchaptercreated'] = 'Chapter created';
|
||||
$string['eventchapterdeleted'] = 'Chapter deleted';
|
||||
$string['eventchapterupdated'] = 'Chapter updated';
|
||||
$string['eventchapterviewed'] = 'Chapter viewed';
|
||||
$string['editchapter'] = 'Edit chapter "{$a}"';
|
||||
$string['hidechapter'] = 'Hide chapter "{$a}"';
|
||||
$string['movechapterup'] = 'Move chapter up "{$a}"';
|
||||
$string['movechapterdown'] = 'Move chapter down "{$a}"';
|
||||
$string['showchapter'] = 'Show chapter "{$a}"';
|
||||
$string['subchapter'] = 'Subchapter';
|
||||
$string['navimages'] = 'Images';
|
||||
$string['navoptions'] = 'Available options for navigational links';
|
||||
|
@ -282,22 +282,28 @@ function book_get_toc($chapters, $chapter, $book, $cm, $edit) {
|
||||
$toc .= html_writer::start_tag('div', array('class' => 'action-list'));
|
||||
if ($i != 1) {
|
||||
$toc .= html_writer::link(new moodle_url('move.php', array('id' => $cm->id, 'chapterid' => $ch->id, 'up' => '1', 'sesskey' => $USER->sesskey)),
|
||||
$OUTPUT->pix_icon('t/up', get_string('up')), array('title' => get_string('up')));
|
||||
$OUTPUT->pix_icon('t/up', get_string('movechapterup', 'mod_book', $title)),
|
||||
array('title' => get_string('movechapterup', 'mod_book', $title)));
|
||||
}
|
||||
if ($i != count($chapters)) {
|
||||
$toc .= html_writer::link(new moodle_url('move.php', array('id' => $cm->id, 'chapterid' => $ch->id, 'up' => '0', 'sesskey' => $USER->sesskey)),
|
||||
$OUTPUT->pix_icon('t/down', get_string('down')), array('title' => get_string('down')));
|
||||
$OUTPUT->pix_icon('t/down', get_string('movechapterdown', 'mod_book', $title)),
|
||||
array('title' => get_string('movechapterdown', 'mod_book', $title)));
|
||||
}
|
||||
$toc .= html_writer::link(new moodle_url('edit.php', array('cmid' => $cm->id, 'id' => $ch->id)),
|
||||
$OUTPUT->pix_icon('t/edit', get_string('edit')), array('title' => get_string('edit')));
|
||||
$OUTPUT->pix_icon('t/edit', get_string('editchapter', 'mod_book', $title)),
|
||||
array('title' => get_string('editchapter', 'mod_book', $title)));
|
||||
$toc .= html_writer::link(new moodle_url('delete.php', array('id' => $cm->id, 'chapterid' => $ch->id, 'sesskey' => $USER->sesskey)),
|
||||
$OUTPUT->pix_icon('t/delete', get_string('delete')), array('title' => get_string('delete')));
|
||||
$OUTPUT->pix_icon('t/delete', get_string('deletechapter', 'mod_book', $title)),
|
||||
array('title' => get_string('deletechapter', 'mod_book', $title)));
|
||||
if ($ch->hidden) {
|
||||
$toc .= html_writer::link(new moodle_url('show.php', array('id' => $cm->id, 'chapterid' => $ch->id, 'sesskey' => $USER->sesskey)),
|
||||
$OUTPUT->pix_icon('t/show', get_string('show')), array('title' => get_string('show')));
|
||||
$OUTPUT->pix_icon('t/show', get_string('showchapter', 'mod_book', $title)),
|
||||
array('title' => get_string('showchapter', 'mod_book', $title)));
|
||||
} else {
|
||||
$toc .= html_writer::link(new moodle_url('show.php', array('id' => $cm->id, 'chapterid' => $ch->id, 'sesskey' => $USER->sesskey)),
|
||||
$OUTPUT->pix_icon('t/hide', get_string('hide')), array('title' => get_string('hide')));
|
||||
$OUTPUT->pix_icon('t/hide', get_string('hidechapter', 'mod_book', $title)),
|
||||
array('title' => get_string('hidechapter', 'mod_book', $title)));
|
||||
}
|
||||
$toc .= html_writer::link(new moodle_url('edit.php', array('cmid' => $cm->id, 'pagenum' => $ch->pagenum, 'subchapter' => $ch->subchapter)),
|
||||
$OUTPUT->pix_icon('add', get_string('addafter', 'mod_book'), 'mod_book'), array('title' => get_string('addafter', 'mod_book')));
|
||||
|
Loading…
x
Reference in New Issue
Block a user