Prince99 has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I have just been given a rather large project and could use some of your direction. I need to design an online testing center for my company. It would be maintained on the company intranet. The tests and results would be stored in our oracle database. There are:

8 departments
5 tests/dept
100 questions/test(approx.)
1/2/4 answers/question

The questions include Multiple Choice, T/F, Matching, and short answer. The short answer will have to be graded manually.
I have been working on the table layout for the db and have come up with the following ideas:

Table 1 - User Record
User Id
Test Type - aka. Department
Test Level - 1 thru 5
Test Score - null(Can't take test), 0 thru 99(Take/Retake test), 100(Test Complete
?'s Missed - Question Numbers from Test Table

Table 2 - Test Record
Test Type - aka Department
Question # - 1 thru 100
Question -
Answer 1 -The Correct answer will have leading special characters(## or || or ~~)
Answer 2 -
Answer 3 -
Answer 4 -

All of this will be done in Perl and I am kinda lost as to where to start looking. If you guys could point me in the direction of some good weekend reading, I would appreciate it. If this is not enough information please reply and I will try and provide further info. Sorry if the question is vague, but I don't have code at this time, just thoughts about implementation. I can implement as I see fit, for the most part, and I am looking for ideas.

As always, thanks for you help in advance.

Prince99
Too Much is never enough...

Replies are listed 'Best First'.
Re: Online Testing Center Project
by Abigail (Deacon) on Jun 09, 2001 at 02:26 UTC
    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

    A reply falls below the community's threshold of quality. You may see it by logging in.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Online Testing Center Project
by Coyote (Deacon) on Jun 10, 2001 at 01:08 UTC
    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

Re: Online Testing Center Project
by Beatnik (Parson) on Jun 09, 2001 at 00:44 UTC
Re: Online Testing Center Project
by Prince99 (Scribe) on Jun 09, 2001 at 00:54 UTC
    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...
Re: Online Testing Center Project
by bluto (Curate) on Jun 09, 2001 at 00:46 UTC
    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.