Well, that looks like a potential large project, and if
you are lost already, then that's not a good sign. You don't
seem to have any Perl question, but I'd like to make some
comments on your table layout. It doesn't look good to me.
First of all, your questions have a certain type. MC, T/F,
matching, short answer. That cannot be found back in the
table structure - the table seems to be for 4 answer MC only.
Don't limit yourself to just 4 answers - one day you will
have questions with 3 or 5 answers. Or 20. A three column
table with fields question_id, answer_number
and answer will do. Perhaps an answer_id
if you don't like multi-field primary keys. You shouldn't
indicate the correct answer by putting some magic token in
the answer. A table relating question_id and
answer_number (or answer_id if you decide
to use them) will do. For T/F questions, you need a table
relating question_id with a boolean value.
You also write there are 8 departments, with 5 test/department.
That leads to 40 tests. However, all I can see from the tables
is up to 100 questions per department. That doesn't make sense.
You need a departments table (key department_id),
a tests table (key test_id), a table relating
departments to tests (just two columns, department_id
and test_id), a table with questions (key question_id)
and a table relating tests with questions.
I don't understand much of your user table. Each user can take
just one test? Why is there a test type in both the user table
and the test record table? How do you intent to store the list
of missed questions? Wouldn't you need a separate table for that?
I think you really need to brush up your database design skills.
-- Abigail | [reply] |
Prince99:
I've been working on an online testing system for several years for use with distance education courses at the University of North Texas. I am in the process of rewriting the system to become a full fledged academic content management system. The system is part of a research project looking at ways to do distance education more effectively. I can't post any code publicly or distribute my application until our initial research has been published, however I can give you a few points of advice and a shopping list of modules to get you started.
Initial Considerations
- The first bit of advice I can give you is that this project is much bigger than it seems on the surface. You might want to consider some of the academic content management systems currently on the market such as WebCT, Mallard from the University of Illinois, or QuestionMark. We use WebCT extensively at the University of North Texas and its worked quite well for us. The cost of a license for one of these projects may end up being much less than the cost of developing and maintaining your own home rolled solution.
- The stateless nature of the http protocol and the lack of control you (as the developer) has over the users environment makes the web fairly inappropriate for doing this kind of work. Consider using something like Macromedia Authorware or Director for the project. For one course we've done, we wrote the instructional portion of the course in Authorware, stored the student's data in a MySQL database, connected to the database via ODBC, and wrote a perl/cgi application for the instructors to view and analyze the students' data. Another approach we've used in a research setting, but haven't tried in a live couse yet is to wrap Internet Explorer into a Visual Basic application and use VB to keep track of state and to control the flow of the program. I'm sure this approach could work with Mozilla or Konquerer if you don't like dealing with MS products or need a platform other than Win32.
- Read and consider the last two points again.
- If you are still compelled to write your own, keep your content, logic, and presentation as separate as possible. The prototype of my testing system was writen in ASP, VBScript, IIS, and MS Access. I rewrote the application using PHP, MySQL, Apache, and Linux due to some stability issues with NT, scalability issues with MS Access and some very strange cookie bugs (remember the state issue?) at some level of the application that we were never able to resolve. Moving to PHP took care of quite a few of our problems, but left us with one fatal problem. PHP (and ASP) encourage you to mix your code with HTML. This makes it very difficult to add new features to the system, makes it nearly impossible to add new developers to the project, and will make your eyes hurt if I have to look at the code for more than a few minutes. The moral here is to keep your content, code, and presentation separated.
- Consider using XML for the test questions. You are planning on several different question types. If you use XML you don't need to come up with a database schema for each type of question in the question bank.
Coyote's shopping list for a web based testing system
Good luck on your project.
Update:Fixed some typos and awkward language.
----
Coyote | [reply] |
| [reply] |
I am somewhat familiar with DBI and DBD, as well as, CGI.pm for generating web pages. Are these the only things you think I would need? I would, of course, have to get more familiar with all three.
Prince99
Too Much is never enough... | [reply] |
I guess this depends on the scope of your "weekend reading" and how much you already know about Perl. Do you
need to learn what Perl is? If you should use it? Do you need to
know how to
generate web pages so users can take a test with it?
How to access a database with it?
Not knowing what you need, one place to start would be looking
at the Book Reviews.
| [reply] |