Hi Devs,
I'm new to Moodle development, and I need to display the instructor's name in the course cards (like those shown on the dashboard or course listing pages).
I noticed that a core function is responsible for passing variables to course-related templates. When I manually pass variables like:
'activitycount' => $activitycount,
'activitycomplete' => $activitycomplete,
directly in the core code, it works, and I can access those values in the template. However, I want to avoid modifying core files.
I've tried building multiple plugins to inject this data but haven’t been successful.
Could you please suggest the best way to pass additional data (like the instructor's name) to the course card templates without touching core code?
Any guidance or examples would be greatly appreciated!
Thanks in advance!