mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-69269 contentbank: add support to download content
This commit is contained in:
parent
4a6a2636a0
commit
c3a4859c7d
9 changed files with 255 additions and 6 deletions
|
@ -84,6 +84,15 @@ if ($contenttype->can_manage($content)) {
|
|||
$attributes
|
||||
));
|
||||
}
|
||||
if ($contenttype->can_download($content)) {
|
||||
// Add the download content item to the menu.
|
||||
$actionmenu->add_secondary_action(new action_menu_link(
|
||||
new moodle_url($contenttype->get_download_url($content)),
|
||||
new pix_icon('t/download', get_string('download')),
|
||||
get_string('download'),
|
||||
false
|
||||
));
|
||||
}
|
||||
if ($contenttype->can_delete($content)) {
|
||||
// Add the delete content item to the menu.
|
||||
$attributes = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue