PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 24th, 2012, 09:44 AM
chocofudge chocofudge is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 3 chocofudge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 10 sec
Reputation Power: 0
PHP-General - Taking a PHP quiz only once

Hi everyone, I am writing a php quiz for my students. Results will be sent to my email, which is what I prefer. The form requires that all questions are answered and that the email they input to identify themselves is valid. Upon submitting, I show answers to questions which were missed and provide the percentage of correct answers. To avoid random people finding my quiz, I have a no-robots tag on the page and can put a JavaScript password on it. I'm fine with the coding for all of that.

But there is always someone who will want to take the quiz a zillion times. The password and validation may slow them down, but somebody will retake it until it's 100% and jam up my inbox. Other than stating, "Only one attempt at the quiz will count for your grade" or "Take this quiz more than once and I'll obliterate all your scores" (no, I wouldn't say that but would like to), is there some code that will prevent them from taking it more than once?

Apologies if this should be in a different forum. Since the quiz is PHP, I thought I'd start here. Any ideas are appreciated.

Reply With Quote
  #2  
Old November 24th, 2012, 10:14 AM
Triple_Nothing Triple_Nothing is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 297 Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 8 h 45 m 39 sec
Reputation Power: 5
This possibly would NOT be the best way, since I'm not sure on where everyone is doing everything, but you can make it allow one submission per IP. This may be an issue if brothers/sisters, or friends are going to be using the same computer/network to submit their answers. If this is a college level item, I would assume the students have college e-mail addresses, which I would then use.

I understand you want the final submission to land in your inbox, which is no problem, but you will still need a database to hold submission values to run your checks against.

Reply With Quote
  #3  
Old November 24th, 2012, 10:35 AM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,881 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 2 Days 8 h 21 m 26 sec
Reputation Power: 813
Hi,

it all comes down to how you validate the registrations. If you make sure that every student has only one account, it's absolutely no problem to limit the number of submissions. You just have to set a flag in the database after the quiz (e. g. "quiz_completed = 1") and not allow a user to take the quiz when the flag is already set. Then the same account (= student) won't be able to repeat the quiz.

Reply With Quote
  #4  
Old November 24th, 2012, 04:43 PM
chocofudge chocofudge is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 3 chocofudge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 10 sec
Reputation Power: 0
Thanks, Triple_Nothing! I was hoping not to have to set up a database (yes, I was being lazy), but I think you're right it will help. I do have a husband-wife team taking the class right now, so the IP address thing could be sticky ....


Reply With Quote
  #5  
Old November 24th, 2012, 04:44 PM
chocofudge chocofudge is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 3 chocofudge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 10 sec
Reputation Power: 0
Thanks, Jacques1! The flag idea will be very useful indeed.


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Taking a PHP quiz only once

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap