Hello,
I'm using moodle 3.6.1 with a boost child theme.
I've read through the various documentation and a lot of forum posts, but can't find an answer for this.
In my theme I have: /testtheme/classes/output/mod_assign_renderer.php which overrides /mod/assign/renderer.php with the class:
class mod_assign_renderer extends /mod_assign_renderer { .... }
That one works ok. I now want to override /mod/assign/gradingtable but can't figure out how. There is a function in mod_assign_renderer.php called render_assign_grading_table($table) {} but that only seems to do the js.
I've tried creating a file /testtheme/classes/output/mod_assign_gradingtable.php with this code, but it doesn't work:
namespace theme_testtheme\output;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/gradelib.php');
require_once($CFG->dirroot.'/mod/assign/locallib.php');
require_once($CFG->dirroot . '/mod/assign/gradingtable.php');
class mod_assign_gradingtable extends \assign_grading_table {
public function __construct( .. put my changes in here.. )
}
I've also tried copying the class mod_assign_gradingtable extends \assign_grading_table into /themetest/classes/output/mod_assign_renderer.php
I can't figure it out at all. Can anyone help?
thanks