MDL-68782 core_contentbank: Fixing undefined variable error
authorAmaia Anabitarte <amaia@moodle.com>
Wed, 20 May 2020 07:25:07 +0000 (09:25 +0200)
committerAmaia Anabitarte <amaia@moodle.com>
Wed, 20 May 2020 10:42:44 +0000 (12:42 +0200)
contentbank/classes/contenttype.php

index 704458a..e2c1940 100644 (file)
@@ -186,8 +186,10 @@ abstract class contenttype {
      */
     public function get_view_content(content $content): string {
         // Trigger an event for viewing this content.
-        $event = contentbank_content_viewed::create_from_record($record);
+        $event = contentbank_content_viewed::create_from_record($content->get_content());
         $event->trigger();
+
+        return '';
     }
 
     /**