Merge branch 'MDL-69270-master' of git://github.com/ferranrecio/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Mon, 31 Aug 2020 05:00:08 +0000 (13:00 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 31 Aug 2020 23:26:02 +0000 (07:26 +0800)
1  2 
contentbank/classes/contenttype.php
contentbank/tests/contenttype_test.php
contentbank/view.php
lang/en/contentbank.php

Simple merge
@@@ -83,16 -83,16 +83,25 @@@ if ($contenttype->can_manage($content)
          false,
          $attributes
      ));
+     if ($contenttype->can_upload()) {
+         $actionmenu->add_secondary_action(new action_menu_link(
+             new moodle_url('/contentbank/upload.php', ['contextid' => $context->id, 'id' => $content->get_id()]),
+             new pix_icon('i/upload', get_string('upload')),
+             get_string('replacecontent', 'contentbank'),
+             false
+         ));
+     }
  }
 +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 = [
Simple merge