Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How to restrict user against marking same event in multiple times

 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am developing student feedback system for educational institution.
Main purpose about this application is to evaluate performance of faculty.
Each user will give userid and password and accordingly he/she will answer the set of question which are included under various event type. The result of this test(event) is stored in final database.
Now how can I restrict the student against giving multiple time same test.
Is it possible that once user marked particular test, the same test should not display them once he/she will log in next time.

Thanks and Regards
Harshal
[ July 29, 2008: Message edited by: Harshal Gurav ]
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes its definitely possible, you'll need some business logic to do that.
 
Harshal Gurav
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amit,
can you more specify the same.
Suppose in table markedevent i stored userid and event that marked by respective user.
i can compare userid of the logged user with userid in the markedevent
but markedevent table may consist of same userid for different event.
Also i have no input event variable so that i can compare it with userid with same event in markedevent table.

Thanks and user
Harshal
[ July 29, 2008: Message edited by: Harshal Gurav ]
 
Amit Ghorpade
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Also i have no input event variable so that i can compare it with userid with same event in markedevent table.


Then how do you store the event in the table?.
Also I think a better approach would be to assign unique id's to the event so that manipulation becomes easy.

Hope this helps
 
Harshal Gurav
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
can anyone update me on above case?
Here is DATABASE STRUCTURE

1. User�consist of user information like username, password etc.

2. Groupid�consists of various groups like group of student, group of faculty. Users are divided into various groups.

3. questionid- consists of question of various types. Each question-id consist multiple question


4. Questionbank: consist of large no. of question for particular question-id. Here you can assume question-id=questiontype. Common between above two table is question-id(int).

5. event table�where various event are published. For each event there may be more than one question-id
e.g event�feedback of semester �4-- containing question-id like: question-id for economics batch, question-id for commerce batch


6. Final output table- consist of userid,question-id,question,answer marked by various user



7.markedevent- consist of userid with eventid of user who voted the perticular event.

my aim is that once any user marked particular event , he/she should not able to see the same event in next login time.
is there required any minor changes in the database structure?
Thanks and Regards
Harshal



[ July 29, 2008: Message edited by: Harshal Gurav ]
[ July 29, 2008: Message edited by: Harshal Gurav ]
 
Amit Ghorpade
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like this has turned into a database question,
So maybe one of the moderators will move it to its appropriate place.


CREATE TABLE markedevent
(
userid int(4) NOT NULL ,
eventid int(4) NOT NULL,
PRIMARY KEY ( userid)
);



When you have multiple eventid's(events), then you need to make the userid and the eventid as the combined primary key for this table.
And then retrieve using userid.


Hope this helps
 
Harshal Gurav
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amit,
Thanks for your post.

Thanks and Regards
Harshal
[ July 31, 2008: Message edited by: Harshal Gurav ]
 
Amit Ghorpade
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are welcome and hope it helps
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic