Quiz review: add category name to question

Quiz review: add category name to question

per Anatoly Klochko -
Nombre de respostes: 2

Is there a way to add category name to every question in quiz review? (url is domain.com/mod/quiz/review.php)

Or I need to add that functionality via creating a new appropriate plugin or some another way?

Thanks

Mitjana de qualificacions: -
En resposta a Anatoly Klochko

Re: Quiz review: add category name to question

per Tim Hunt -
Imatge Core developers Imatge Documentation writers Imatge Particularly helpful Moodlers Imatge Peer reviewers Imatge Plugin developers

You could probably achieve this using this technique https://docs.moodle.org/dev/Overriding_a_renderer to override one of the quiz or question renderers.

En resposta a Tim Hunt

Re: Quiz review: add category name to question

per Anatoly Klochko -
Thanks, Dear

It is really right direction. I extended the   core_question_renderer   and overriden few its methods. I have archieved my goal.

And I have few questions to You:

1. We have overriden a component renderer and all its files live in a theme folder (current theme). So, is there a way how override a component renderer for every theme (on case if theme will be changed)? In other words: how to make overriden renderer independent from theme?

2. I have added few templates to   question  component. Where I have to place a css-code of a component template?

3. In a render method I obtane a data (category name). But it is a task of a model. In that method is able the question_attemp object. So, WHERE I have to place a such method? In  question_attempt class? If yes, then what is a way to override this class?

Thanks, You are really helpful.