MDL-68854 repository_contentbank: add size to content nodes
authorVíctor Déniz Falcón <victor@moodle.com>
Thu, 28 May 2020 12:30:38 +0000 (13:30 +0100)
committerVíctor Déniz Falcón <victor@moodle.com>
Thu, 28 May 2020 12:30:38 +0000 (13:30 +0100)
repository/contentbank/classes/helper.php

index 2df172d..ea8a169 100644 (file)
@@ -106,6 +106,7 @@ class helper {
             'author' => $file->get_author(),
             'license' => $file->get_license(),
             'isref' => $file->is_external_file(),
+            'size' => $file->get_filesize(),
             'source' => $encodedpath,
             'icon' => $OUTPUT->image_url(file_file_icon($file, 24))->out(false),
             'thumbnail' => $OUTPUT->image_url(file_file_icon($file, 90))->out(false)