Overriding overriden course_renderer

Re: Overriding overriden course_renderer

by Davo Smith -
Number of replies: 1
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
As the class name 'theme_fordsone_course_renderer' does not match the filename 'course_renderer.php', I suspect the automatic class loading is failing.

You could try manually calling require_once($CFG->dirroot.'/theme/fordson/classes/output/course_renderer.php') - that should fix the issue?
Average of ratings: Useful (1)
In reply to Davo Smith

Re: Overriding overriden course_renderer

by Edukacija.net mentor -
Thank you Davo.
Yes, this helped, although another issue was because of the conditional overriding in Fordson theme:
    
if ($PAGE->theme->settings->coursetilestyle < 10) {
    class course_renderer extends \core_course_renderer  {
So, if the settings didn't match the above condition, course_renderer wasn't overriden. Once I added the same condition and require_once like you suggested, everything worked ok.