MDL-48700 gradereport_history: Don't limit downloads by pages.

This commit is contained in:
Eric Merrill
2014-12-23 16:11:02 -05:00
parent 981f06fad5
commit 8e63ce4e02
2 changed files with 6 additions and 1 deletions
@@ -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;
}
+1
View File
@@ -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();
}