This is definitively not ideal. Like you said the
I haven't really understood you last statement about
$data
object will often be very bloated and you'll have to browse all of that to insert your addtional data where you want it. As renderables are not overridable in themes, or at least I haven't found out how if that's possible, I don't see any other solution.I haven't really understood you last statement about
get_output_classname
. This function is present in the course format base class according to the docs; you would want it to look for renderables inside a theme first, then the course format and then the core if not found before?