Commit 1c729ff6 authored by Simey Lameze's avatar Simey Lameze
Browse files

MDL-59785 mod_book: all navigation styles must mark as completed

parent 8146b1f0
......@@ -149,7 +149,6 @@ foreach ($chapters as $ch) {
$last = $ch->id;
}
$islastchapter = false;
if ($book->navstyle) {
$navprevicon = right_to_left() ? 'nav_next' : 'nav_prev';
$navnexticon = right_to_left() ? 'nav_prev' : 'nav_next';
......@@ -196,11 +195,15 @@ if ($book->navstyle) {
$chnavigation .= ' <a title="' . $navexit . '" class="bookexit" href="'.$returnurl.'">' .
'<span class="chaptername">' . $navexit . '&nbsp;' . $OUTPUT->uarrow() . '</span></a>';
}
$islastchapter = true;
}
}
// We need to discover if this is the last chapter to mark activity as completed.
$islastchapter = false;
if (!$nextid) {
$islastchapter = true;
}
book_view($book, $chapter, $islastchapter, $course, $cm, $context);
// =====================================================
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment