Overriding overriden course_renderer

Re: Overriding overriden course_renderer

Davo Smith írta időpontban
Válaszok szám: 1
Kép Kép Kép Kép
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?
Értékelések átlaga:Useful (1)
Válasz erre: Davo Smith

Re: Overriding overriden course_renderer

Edukacija.net mentor írta időpontban
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.