From 8e63ce4e0292d41a448dc47651acdf27da9e18f7 Mon Sep 17 00:00:00 2001 From: Eric Merrill Date: Tue, 23 Dec 2014 16:02:04 -0500 Subject: [PATCH] MDL-48700 gradereport_history: Don't limit downloads by pages. --- grade/report/history/classes/output/tablelog.php | 6 +++++- grade/report/history/index.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/grade/report/history/classes/output/tablelog.php b/grade/report/history/classes/output/tablelog.php index 04c308f780c..b5253a32dde 100644 --- a/grade/report/history/classes/output/tablelog.php +++ b/grade/report/history/classes/output/tablelog.php @@ -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; } diff --git a/grade/report/history/index.php b/grade/report/history/index.php index eb1ebf95ec5..905f91e734c 100644 --- a/grade/report/history/index.php +++ b/grade/report/history/index.php @@ -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(); }