On-Rev Web Form Dropping Data

Bob Sneidar bobs at twft.com
Wed Dec 1 17:17:35 CST 2010


I'm curious if you accounted for the fact that two people can be connecting from the same IP address, or that one student can be connected twice (odd though that may be, but think about someone connecting via ethernet, then mid session switching to wireless). 

By their ID do you mean a unique ID generated when they connect, or a student ID that is the same each time they connect? If the latter, then I can begin to envision circumstances where things could go wiggy. There is not mechanism to prevent a student from logging on twice from different computers, is there? That should probably be addressed. First rule of programming: If there is a way for an end user to screw things up, they will find it, no matter how remote. 

Also, the ID assigned upon successful validation should be a unique incrementing ID that represents the session, not the student, but tied to the student ID. 

These are just some thoughts and I could be way off the mark here, so pardon me in advance. 

Bob


On Dec 1, 2010, at 2:51 PM, Gregory Lypny wrote:

> Hello everyone,
> 
> I have a little web form problem that has me scratching my head, perhaps because I might be in over my head.  Here goes.  I have an On-Rev site that I use to manage certain activities in a couple of the university courses I teach.  One page on the site is a simple form that allows my students to submit the answers to multiple-choice homework quizzes.  This is how it works.
> 
> - The student signs in using a user ID and password
> - After validation, a cookie is deposited in their computer
> - The cookie name and cookie value are written to a database (a text file) with a reference to their ID
> - They go to the web form, select their answers from pull down menus and click Submit
> - The data that gets submitted includes their ID, a timestamp (the seconds), and the list of answers, all on one line and comma delimited
> - The data is prepended to a text file that is the database of all quiz submissions
> - To avoid the possibility of two or more students writing to the database at once because they are, by coincidence, submitting at exactly the same moment, I have a parameter file called Busy whose contents are set to "True, [the seconds]" when they submit and set to "False, [the second]" at the end of processing.  The database is allowed to be busy for a maximum of six seconds.
> 
> This has worked almost flawlessly for more than 1,800 submissions, but on a couple of occasions, the answer choices are missing from the submitted data.  I should always be receiving something like
> 
> Course, Student ID,Quiz Number,Timestamp,Q1,Q2,Q3, and so on
> Economics 101,1234567,8,1291161639,C,B,B,...
> 
> where the C,B,B at the end are their first three answer choices.
> 
> Instead, on those rare instances, I get
> 
> Course, Student ID,Quiz Number,Timestamp,Q1,Q2,Q3, and so on
> Economics 101,1234567,8,1291161639,
> 
> where the answers choices are missing.  I have the web form's pulldown menus set up so that Xs are submitted by default for blank answers, so if anything, I should get at least a sequence of Xs.
> 
> I looked more closely at the two most recent problem submissions, and here is what I have been able to determine from the sign-in log and submission database.
> 
> - The submissions were made two seconds apart from the same IP address
> - There were, however, two separate sign-in sessions, that is, two cookies set with different names about eight minutes apart
> - The student who submitted their answers first signed in later than the one who submitted second!
> 
> Any thoughts?  Would this occur if two people signed in on separate accounts on the same computer?  I'm going to try to track them down and get them to describe exactly what they did, but I'd be most interested in knowing your thoughts.  My apologies for the length of this saga.
> 
> Regards,
> 
> Gregory
> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list