## General developer forum

### Can the class qbehaviour_renderer be overriden in theme?

Re: Can the class qbehaviour_renderer be overriden in theme?

Thank you very much for your detailed reply, I really appreciate it. I actually did see that the base calls was ovrriden by the various behaviours but it didn't occur to me that that means I should be extending them. Wasn't thinking things through, unfortunately.

I tried now, however, to override one of the subclassses used in our instance - adaptivenopenalty:
require_once(\$CFG->dirroot . '/question/behaviour/adaptivenopenalty/renderer.php'); class theme_mytheme_qbehaviour_adaptivenopenalty_renderer extends \qbehaviour_adaptivenopenalty_renderer {}
But that still doesn't work (the function isn't called), and on some pages it even gives me an error about its parent class (qbehaviour_adaptivenopenalty_renderer extentds qbehaviour_adaptive_renderer) and that's weird since I didn't touch any other file other that my core_renderer: