Hi, I have been trying to write code for making an online exam
management system. I could not think about a logic to implement the
actual exam.
Here is the problem:
I have a questions table with fields like- id, question, opt1, opt2,
opt3, opt4 and correctans.
I want to read all the records from this table but I want to display
only one record at a time for user to answer the question. User then
clicks next to see the next question and choices and so on till the end
of the records.
I don't know how to implement this. I did
@questions=Question.find(:all)
Now how can I use this @questions and display only one record at a time
so that user answers the question and then I can do something to store
the user response?
OR if I am wrong, please suggest good logic to implement this.
First of all, online exam must be have category of exam. each exam must
be up to date and never the same each date. out of your case i would
like to try my mind in this case now.
if you find any error, keep post it, I will review back when I'm online.
I hope some my brothers can develop my code and give good suggestion
from my code or maybe can provide new code.
Have nice weekend
Y. Reinhart A P
Blog : teapoci.blogspot.com
Thank you brother. You helped me a lot. I did it..
Actually I was implementing someting too simple with single table for
practice. But now I will use multiple tables with relations and a real
working implementation.