Commit 6b46ce4c authored by jun's avatar jun
Browse files

MDL-71161 mod_book: Display activity information output component

parent 8d38fc7e
......@@ -208,6 +208,12 @@ book_view($book, $chapter, $islastchapter, $course, $cm, $context);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($book->name));
// Render the activity information.
$cminfo = cm_info::create($cm);
$cmcompletion = \core_completion\cm_completion_details::get_instance($cminfo, $USER->id);
$activitydates = \core\activity_dates::get_dates_for_module($cminfo, $USER->id);
echo $OUTPUT->activity_information($cminfo, $cmcompletion, $activitydates);
// Info box.
if ($book->intro) {
echo $OUTPUT->box(format_module_intro('book', $book, $cm->id), 'generalbox', 'intro');
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