How to get the $response in renderer.php or questiontype.php ?

How to get the $response in renderer.php or questiontype.php ?

by François Mauviard -
Number of replies: 0

Hi everybody,

After a few days trying to understant it and not be able to get it in any way, I would understand the complete way by which a response to a specific response field is located by the question engine within code normally generated by renderer.php.
I've made a few advances in understanding question type and localizing the $response['answer'] for example in is_same_response for example. I also have been reading thouroughly the question engine related docs without finding any trace of it.
In my code, the correct value is in a span such as the bootstrap rangeslider documentation proposes. I don't use the the input tag because yui_combo preserves the input field from beeing changed by extra javascript. What I don't get is

  1. Is the tag located by Moodle named or Id (get_qt_field_name('answer')) automaticallly, or is it recognized by other ways ?
  2. Are the fields for the answer input mandatory tags ?
  3. Is there a way to change that ?

Can you help me one more time ?
Thank you in advance,
François


Average of ratings: -