mod_assign Grader overriding in a theme.

Re: mod_assign Grader overriding in a theme.

by Gareth J Barnard -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Bingo!  Another solution using older method in the theme's 'classes' folder:

use \mod_assign\output\grading_app;
class theme_essential_mod_assign_renderer extends mod_assign_renderer {
    /**
     * Defer to template..
     *
     * @param grading_app $app - All the data to render the grading app.
     */
    public function render_grading_app(grading_app $app) {
        $context = $app->export_for_template($this);
error_log('Overridden');
        return $this->render_from_template('mod_assign/grading_app', $context);
    }
}
Average of ratings: Useful (1)