mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-72830 repository_contentbank: Use content specific icons
This commit is contained in:
parent
35b993b694
commit
3aa3b664ab
@ -96,6 +96,7 @@ class helper {
|
||||
'filename' => $file->get_filename()
|
||||
];
|
||||
|
||||
$contenttype = $content->get_content_type_instance();
|
||||
$encodedpath = base64_encode(json_encode($params));
|
||||
|
||||
$node = [
|
||||
@ -108,8 +109,8 @@ class helper {
|
||||
'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)
|
||||
'icon' => $contenttype->get_icon($content),
|
||||
'thumbnail' => $contenttype->get_icon($content)
|
||||
];
|
||||
|
||||
if ($file->get_status() == 666) {
|
||||
@ -131,4 +132,4 @@ class helper {
|
||||
'name' => $context->get_context_name(false)
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user