Merge branch 'MDL-48700-master' of git://github.com/merrill-oakland/moodle

This commit is contained in:
Andrew Nicols 2015-01-05 13:30:55 +08:00
commit ba5b6abe0e
2 changed files with 6 additions and 1 deletions

View File

@ -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;
}

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();
}