Needs work but does not use auth, but it is a good starting point.
http://web2py.com/appliances/default/show/66

On Apr 15, 1:59 pm, Drise <[email protected]> wrote:
> I am looking display a page that allows users to take a simple quiz.
> The databases I have defined work. The part that isn't so clear for me
> is how to display and receive the results from the quiz. I need to
> display radio buttons for each choice in of answers relating to the
> question.
>
> My databases:
>
> db.define_table('quiz',
>    Field('title'),
>    Field('is_published', 'boolean', default=False))
>
> db.define_table('question',
>    Field('quiz_id', db.quiz),
>    Field('question'))
>
> db.define_table('answers',
>    Field('question_id', db.question),
>    Field('answer'),
>    Field('weight', default=1))
>
> db.question.quiz_id.requires = IS_IN_DB(db, db.quiz.id, '%(title)s')
>
> db.answers.question_id.requires = IS_IN_DB(db, db.question.id, '%
> (question)s')
>
> How should I go by this?

Reply via email to