Merge branch 'MDL-59785-32' of git://github.com/lameze/moodle into MOODLE_32_STABLE

This commit is contained in:
Jun Pataleta
2017-08-14 16:57:18 +08:00
+6 -3
View File
@@ -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);
// =====================================================