mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-59785 mod_book: all navigation styles must mark as completed
This commit is contained in:
parent
8146b1f06d
commit
1c729ff624
@ -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 . ' ' . $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);
|
||||
|
||||
// =====================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user