Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
6b46ce4c
Commit
6b46ce4c
authored
Mar 25, 2021
by
jun
Browse files
MDL-71161 mod_book: Display activity information output component
parent
8d38fc7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/book/view.php
View file @
6b46ce4c
...
...
@@ -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'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment