User Created Tables

I have a situation that is a little more complicated than I’m used to
dealing with. I thought I would see what others thought before I made
a decision spent a few days and realized I had done something stupid
and had to start a re-write :wink:

I have been asked to create a web-based course evaluation system for
the Community College I work for. My first response is: No problem,
that won’t take long at all. Then I learn that a committee gets
together every year to evaluate the evaluation process (apparently
they like to change the questions. The problem I see is maintaining
the relevance of old data after the committee has decided to make
changes to the evaluation form.

I’m thinking I will have to perform some sort of dynamic table
creation so that the question/answer data on old evaluations will
still be sane if the committee makes changes to the questions/format
of the evaluations in the future.

Does anyone have a better idea for future proofing this thing?

Thanks,
Glen

I have been asked to create a web-based course evaluation system for
the Community College I work for. My first response is: No problem,
that won’t take long at all. Then I learn that a committee gets
together every year to evaluate the evaluation process (apparently
they like to change the questions. The problem I see is maintaining
the relevance of old data after the committee has decided to make
changes to the evaluation form.

Have a questions table, with a column for year? Then instead of using
an association against the whole questions table, make your
associations limited to questions in the current year? That’d work if
the evaluations are in the middle of the year. Otherwise you’d need an
application setting to set the current eval year.

has_many :current_questions, :class_name => 'Question', conditions

=> [“year = ?”, DateTime.now.year]

Then you could have your current evaluations done against that
association, and your reporting / previous years still access the base

Thanks Jim,

That makes perfect logical sense. I’m obviously not that with it
today :wink: