Moodle Quiz: Only last question in the quiz getting graded?
I have tweaked the functionality of Quiz in such a way that even if there are say 5-10 questions in a quiz, each question is displayed to the student at a time.
I have not done this using the settings of "question per page" but by coding all the question ids for a particular quiz in a temporary table and displaying each question one by one from the table.
Thus every time the student receives only one question on a page as set in the table, and when he refreshes the page, (staying on the same page) another question comes up.
But the problem is, only the last question in the quiz gets graded after clicking on "Submit all and Finish"
Maybe it is because every time the page gets refreshed, a new question loads up, and finally it only recognises that question in the end. The responses for all other questions do not get stored.
Right now I am kind of clueless so as to which functions or which files I should modify in order to grade each question. Can anyone please help me with this so as to how should I get a student's response on each question
Can something be done in order to save which ever option student clicks on the click event of radio button and save it is question_states or would this be fiddling around with existing functions meant for doing the same thing.
Please help as I at least need a right direction to proceed in further.