Hi guys,
I need to override the export_for_template method from core_courseformat\output\local\content in my custom theme so I can provide some custom data to the mustache template.
I did the following but it didn't work:
- I created a content.php file in ROOT/theme/MY_THEME/classes/output/core_courseformat/local
- In the content.php file I have the following code:
namespace theme_MY_THEME\output\core_courseformat\local;
defined('MOODLE_INTERNAL') || die();
use core\output\named_templatable;
use core_courseformat\base as course_format;
use course_modinfo;
use renderable;
class content extends \core_courseformat\output\local\content {
public function export_for_template(\renderer_base $output) {
...
}
}
But for some reason it does not work.
Could you please let me know what I'm doing wrong? Thanks.