Hello,
My problem is that we want to have one book, that could be editable by students. I noticed the "mod/book:edit" capability indeed renders the book editable but fails to display the "Turn editing on" button, hence preventing book editing.
In the code (lib.php, function book_edit_button), the visibility of this button is controlled by :
if (isteacheredit($courseid)) {
which I replaced by
$context = get_context_instance(CONTEXT_MODULE, $id);
$allowedit = has_capability('mod/book:edit', $context);
if ($allowedit) {
Is the code wrong, or am I ?
Many thanks for any views/thoughts on this.