Skip to content

Commit

Permalink
Merge branch 'MDL-69458-master' of git://github.com/mihailges/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Aug 27, 2020
2 parents 134cddd + 0ca1792 commit 2830f39
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions report/insights/classes/output/insights_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ public function export_for_template(\renderer_base $output) {
$data->noinsights = $notification->export_for_template($output);
}

$url = $PAGE->url;

if ($this->othermodels) {

$options = array();
Expand All @@ -207,14 +209,15 @@ public function export_for_template(\renderer_base $output) {
}

// 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;
}
Expand Down

0 comments on commit 2830f39

Please sign in to comment.