Merge branch 'MDL-71161-master-4' of git://github.com/junpataleta/moodle

This commit is contained in:
Adrian Greeve 2021-04-13 11:42:30 +08:00
commit 83b71194cd
25 changed files with 586 additions and 10 deletions

View file

@ -226,6 +226,8 @@ class mod_assign_renderer extends plugin_renderer_base {
* @return string
*/
public function render_assign_header(assign_header $header) {
global $USER;
$o = '';
if ($header->subpage) {
@ -244,6 +246,14 @@ class mod_assign_renderer extends plugin_renderer_base {
$o .= $this->output->header();
$o .= $this->output->heading($heading);
// Show the activity information output component.
$modinfo = get_fast_modinfo($header->assign->course);
$cm = $modinfo->get_cm($header->coursemoduleid);
$cmcompletion = \core_completion\cm_completion_details::get_instance($cm, $USER->id);
$activitydates = \core\activity_dates::get_dates_for_module($cm, $USER->id);
$o .= $this->output->activity_information($cm, $cmcompletion, $activitydates);
if ($header->preface) {
$o .= $header->preface;
}