When implementing hinting facility for my preg question I come to a problem. To find best answer for the hint I should do potentially time-consuming work. This also helps grading (especially if teacher want have partially correct answers partially graded).
Where I should do it (to avoid been overdone)? Two major questiontype functions involved in this is grade_responses and print_question_formulation_and_controls.
For now my best plan is to find best fitted answer in grade_responses, than add this answer to the $state->responses, using that later in print_question_formulation_and_controls. If I'm wrong or there is best way to do this, please tell me.
In reply to Oleg Sychev
Re: Where to place a time-consuming part for grading and hinting
by Tim Hunt -
Yes, that is the best way for now.
I took this requirement into account in Development:Question_Engine_2, and it is recognised that question types might want to compute and store things during grading that are later used for display.
Actually, the solution I adopted in QE2 is very like adding extra data to $state->responses, but the API helps you do that in a nice way.
I took this requirement into account in Development:Question_Engine_2, and it is recognised that question types might want to compute and store things during grading that are later used for display.
Actually, the solution I adopted in QE2 is very like adding extra data to $state->responses, but the API helps you do that in a nice way.