Skip to content

Commit

Permalink
MDL-24295, fixed display of course files
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed Sep 21, 2010
1 parent 927b2e7 commit 276943d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions files/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@ public function render_files_tree_viewer(files_tree_viewer $tree) {

$html .= $this->output->box_start();
$table = new html_table();
$table->head = array(get_string('filename', 'backup'), get_string('time'), get_string('size'));
$table->align = array('left', 'left', 'left');
$table->head = array(get_string('filename', 'backup'), get_string('size'), get_string('modified'));
$table->align = array('left', 'right', 'right');
$table->width = '100%';
$table->data = array();

foreach ($tree->tree as $file) {
if (!empty($file['isdir'])) {
$table->data[] = array(
html_writer::link($file['url'], $this->output->pix_icon('f/folder', 'icon') . ' ' . $file['filename']),
$file['filedate'],
'',
$file['filedate'],
);
} else {
$table->data[] = array(
html_writer::link($file['url'], $this->output->pix_icon('f/'.mimeinfo('icon', $file['filename']), get_string('icon')) . ' ' . $file['filename']),
$file['filesize'],
$file['filedate'],
display_size($file['filesize']),
);
}
}
Expand Down

0 comments on commit 276943d

Please sign in to comment.