File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Online Exam

 
Bismi Varghese
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am developing an online exam web application now. But i am confused about how i can access questions from database randomly..because i want to change questions for each student.
can you please give me some ideas. i am using struts frame work....
Thanks in advance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13044
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the creator of several on-line exam engines, I have the following suggestions:

1. make authoring and editing questions as easy as possible.

2. committing to database storage limits your flexibility - suppose you want to add a new style of question - have to redesign the database, what a pain.

3. given 1 & 2 - I ended up using an XML "script" of questions kept in memory as a DOM.

Bill

 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bismi Varghese wrote:
I am developing an online exam web application now. But i am confused about how i can access questions from database randomly..because i want to change questions for each student.

William has really nice suggestions you should think of.
If you want to stick to the database, here is what I did for this during my college.
1) Have a table with the question IDs and timestamp when it was asked.
2) Generate the random question ID and check the same in this table, if it exists, generate new question ID and update this table.
3) Have a script that runs every hour to remove records from the above table which are on hour old.

I don't know why I designed it that way, but it worked.

To prevent repeating a question to the same user, having the question ID in his/her session will suffice.
 
Tiklu Mukherjee
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What i can figure it out and accordingly i have a solution,

Try to use JdbcRowSet object , when you create a JdbcRowSet Object pass the resultSet object as a parameter to JdbcRowSet Constructor as below:

where the resultSet object is " SCROLL_SENSITIVE ",so that you can move BACK and FORTH within the resultSet content.
NOTE: (rs) is the result set object that you need to define before jdbcrowset.
After you define the resultSet make the cursor point to the end of the ROW in the resultSet and get the count of that row.
the best advantage of using the JdbcRowSet is that you can scroll at any perticular location in the row , hence forth use

I hope you can figure it out ,or in-case let me know if you need more details .

Thanks,
abhijitmukherjee655@gmail.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic