views:

19

answers:

0

I want to make a simple examing application on RoR 2.3. The problem area is to make an exam_session in a one form with only one submit action. For the exam session there are selected some number of questions from the question pool in random order. For these questions there are selected some number of alternatives (to check is this a single answer question or multi answer question I use the number of correct alternatives: if only 1 - single, > 1 - multi. Radiobuttons or checkboxes in form to answer depends on it). I have models: Questions ---< Alternative and ExamSession. I think there must be has_many :through relations between ExamSession and Questions and has_many :through relation between the intermediate table (for example QuestionsExamSession) and Alternative to point what alternatives are answers of the student on this Question.

So the questions are:

  1. Is this scheme is too complicated and there is a way to do it simple and clear?
  2. Is there any way to organize models in such a way to make the form I want to work?