mirror of
https://github.com/moodle/moodle.git
synced 2025-03-21 08:00:37 +01:00
Merge branch 'MDL-48700-master' of git://github.com/merrill-oakland/moodle
This commit is contained in:
commit
ba5b6abe0e
@ -467,7 +467,11 @@ class tablelog extends \table_sql implements \renderable {
|
||||
list($sql, $params) = $this->get_sql_and_params();
|
||||
$total = $DB->count_records_sql($countsql, $countparams);
|
||||
$this->pagesize($pagesize, $total);
|
||||
$histories = $DB->get_records_sql($sql, $params, $this->pagesize * $this->page, $this->pagesize);
|
||||
if ($this->is_downloading()) {
|
||||
$histories = $DB->get_records_sql($sql, $params);
|
||||
} else {
|
||||
$histories = $DB->get_records_sql($sql, $params, $this->pagesize * $this->page, $this->pagesize);
|
||||
}
|
||||
foreach ($histories as $history) {
|
||||
$this->rawdata[] = $history;
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ $mform->set_data($filters);
|
||||
|
||||
if ($table->is_downloading()) {
|
||||
// Download file and exit.
|
||||
\core\session\manager::write_close();
|
||||
echo $output->render($table);
|
||||
die();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user