mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-69458 report_insights: Respect perpage value in pagination bar
This commit is contained in:
parent
e290345cd6
commit
185fc93ed5
1 changed files with 5 additions and 2 deletions
|
@ -199,6 +199,8 @@ class insights_list implements \renderable, \templatable {
|
|||
$data->noinsights = $notification->export_for_template($output);
|
||||
}
|
||||
|
||||
$url = $PAGE->url;
|
||||
|
||||
if ($this->othermodels) {
|
||||
|
||||
$options = array();
|
||||
|
@ -207,14 +209,15 @@ class insights_list implements \renderable, \templatable {
|
|||
}
|
||||
|
||||
// New moodle_url instance returned by magic_get_url.
|
||||
$url = $PAGE->url;
|
||||
$url->remove_params('modelid');
|
||||
$modelselector = new \single_select($url, 'modelid', $options, '',
|
||||
array('' => get_string('selectotherinsights', 'report_insights')));
|
||||
$data->modelselector = $modelselector->export_for_template($output);
|
||||
}
|
||||
|
||||
$data->pagingbar = $output->render(new \paging_bar($total, $this->page, $this->perpage, $PAGE->url));
|
||||
// Add the 'perpage' parameter to the url which is later used to generate the pagination links.
|
||||
$url->param('perpage', $this->perpage);
|
||||
$data->pagingbar = $output->render(new \paging_bar($total, $this->page, $this->perpage, $url));
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue