Displaying 2 results from an estimated 2 matches for "correct_answ".
Did you mean:
correct_answer
2006 Apr 02
2
"Quiz" site
...out how to "mark" the quiz. The form is
submitted to the controller, which must somehow work out whether each
one is correct. Perhaps each option group could have some form of
identifier that the controller looks at, makes a new "question" object
and checks "question.correct_answer" or somesuch? Once this is done,
the users profile can be updated with their result (etc).
Now if I want to display questions in a random order (say a quiz has 40
questions, I only want 20 for a particular attempt), I can easily grab
only 20 and jumble them up. But how does the control...
2006 Jun 21
5
newbie - question on radio_buttons
...t;%= start_form_tag(:action => "process_answer") %>
....
<%= radio_button "radio", "answer", "a" %> (A)
inside the process_answer, I have the following:
def process_answer
if params[:answer] == "c"
redirect_to(:action => "correct_answer")
end
end
it does not like this
any thoughts??
Seamus
--
Posted via http://www.ruby-forum.com/.