mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-73772 reports: Fix Activity completion report with no group select
This commit is contained in:
parent
5897242361
commit
ddfc3316f3
@ -47,7 +47,7 @@ class renderer extends plugin_renderer_base {
|
||||
);
|
||||
$activityincludeselect->set_label(get_string('include', 'report_progress'));
|
||||
return \html_writer::div($this->output->render($activityincludeselect),
|
||||
'include-activity-selector d-inline-block ml-3' );
|
||||
'include-activity-selector d-inline-block mr-3' );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -69,7 +69,26 @@ class renderer extends plugin_renderer_base {
|
||||
);
|
||||
$sorttable->set_label(get_string('activityorder', 'report_progress'));
|
||||
return \html_writer::div($this->output->render($sorttable),
|
||||
'activity-order-selector include-activity-selector d-inline-block ml-3');
|
||||
'activity-order-selector include-activity-selector d-inline-block');
|
||||
}
|
||||
|
||||
/**
|
||||
* Render groups single select box.
|
||||
*
|
||||
* @param \moodle_url $url The base url.
|
||||
* @param \stdClass $course Current course.
|
||||
* @return string HTML
|
||||
*/
|
||||
public function render_groups_select(\moodle_url $url, \stdClass $course): string {
|
||||
$groupurl = fullclone($url);
|
||||
$groupurl->remove_params(['page', 'group']);
|
||||
$groupoutput = groups_print_course_menu($course, $groupurl, true);
|
||||
|
||||
if (empty($groupoutput)) {
|
||||
return $groupoutput;
|
||||
}
|
||||
|
||||
return \html_writer::div($groupoutput, 'd-inline-block mr-3');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,9 +200,7 @@ if ($csv && $grandtotal && count($activities)>0) { // Only show CSV if there are
|
||||
$PAGE->requires->js_call_amd('report_progress/completion_override', 'init', [fullname($USER)]);
|
||||
|
||||
// Handle groups (if enabled).
|
||||
$groupurl = fullclone($url);
|
||||
$groupurl->remove_params(['page', 'group']);
|
||||
groups_print_course_menu($course, $groupurl);
|
||||
echo $output->render_groups_select($url, $course);
|
||||
|
||||
// Display include activity filter.
|
||||
echo $output->render_include_activity_select($url, $activitytypes, $activityinclude);
|
||||
|
Loading…
x
Reference in New Issue
Block a user