Need to add imageID to the answer_log schema in order to implement userstats properly:
ALTER TABLE answer_log ADD imageID int(11) NOT NULL
Other thing I noticed: For userstats, what is the purpose of storing Accuracy when that depends on things that change on every refresh? For example, popular answers change which means that the accuracy will change each question answered.
This is correct, thanks for noticing it! I have updated the database schema in MySQL and the a3.setup.sql file.
Regarding the accuracy field, this is used to store the accuracy values during your computation of them, since it will be a complex query. Then the display query becomes very easy.
Does the administrator setup page delete the tuples from the "users" table, in addition to the "questions", "answers" and statistics tables? Or do we hold onto the "users"?
When a user answers the same question about the same answer twice, should we record both answers with different timestamps, or replace the old answer with the newer one?
Regarding the login functionality, since a lot of you have asked me:
There is no separate login page, but all authenticated pages should check first if the user is logged in (through cookies, for example), and if not, show a login page. If yes, you would just get to the page you meant to go.
After authentication, is the user directed to a home page, or to the last page that required his authentication (e.g. if he came to the login page from the "Question Stats" page, he'll be redirected back to "Question stats")
Since there is no specific home page, it is best if after authentication the user is again back to the page that requested him/her be authenticated in the first place.
1. Is it necessary to show users in the User Statistics who have answered no questions? 2. After creating a new user, is that new user automatically logged in? 3. After creating a new user, to which page is the user redirected? 4. Should there be a main webpage from which to access each of these individual php files (e.g. a page that just lists all of the links?)
1: Yes 2: Yes 3: None necessarily, but you could provide links to the other pages and they can click them. 4. Up to you. I did not include that in the requirements, because there are few pages.
I'm a bit confused about what questionstats.php is supposed to do. In my reading of the assignment, it looks like it reads through every question and displays the percentage of each possible answer given for each question. It doesn't look like this is tied to the imageid at all. Should question stats show the chart based on imageid or based on questionid?
Clarification: In questionstats.php, my expectation was the you would put all question+image combinations and report the statistics there, but I realize that this was not fully spelled out in the description. SO, if you have done it where you only have the statistics per question only (i.e., across all images), then we will accept this as a valid answer.
Need to add imageID to the answer_log schema in order to implement userstats properly:
ReplyDeleteALTER TABLE answer_log
ADD imageID int(11) NOT NULL
Other thing I noticed: For userstats, what is the purpose of storing Accuracy when that depends on things that change on every refresh? For example, popular answers change which means that the accuracy will change each question answered.
This is correct, thanks for noticing it! I have updated the database schema in MySQL and the a3.setup.sql file.
DeleteRegarding the accuracy field, this is used to store the accuracy values during your computation of them, since it will be a complex query. Then the display query becomes very easy.
I think the XML example file has a bug/typo with the image URL:
ReplyDeletehttp://images3.wikia.nocookie.net/__cb20120207004614/thehungergames/images/thumb/f/f4/Kateverdeen.jpg/200px-Kateverdeen.jpg
http://upload.wikimedia.org/wikipedia/commons/2/26/YellowLabradorLooking_new.jpg
I think it should be:
http://images3.wikia.nocookie.net/__cb20120207004614/thehungergames/images/thumb/f/f4/Kateverdeen.jpg/200px-Kateverdeen.jpg
http://upload.wikimedia.org/wikipedia/commons/2/26/YellowLabradorLooking_new.jpg
Thanks a lot for pointing this error -- I have since corrected it in the a3.input.xml file..
ReplyDeleteCheers,
Alex
Does the administrator setup page delete the tuples from the "users" table, in addition to the "questions", "answers" and statistics tables? Or do we hold onto the "users"?
ReplyDeleteYou can hold on to the users if you want.
DeleteWhen a user answers the same question about the same answer twice, should we record both answers with different timestamps, or replace the old answer with the newer one?
ReplyDeleteYou should record both answers.
DeleteRegarding the login functionality, since a lot of you have asked me:
ReplyDeleteThere is no separate login page, but all authenticated pages should check first if the user is logged in (through cookies, for example), and if not, show a login page. If yes, you would just get to the page you meant to go.
It is up to you to provide logout functionality.
After authentication, is the user directed to a home page, or to the last page that required his authentication (e.g. if he came to the login page from the "Question Stats" page, he'll be redirected back to "Question stats")
ReplyDeleteSince there is no specific home page, it is best if after authentication the user is again back to the page that requested him/her be authenticated in the first place.
Delete1. Is it necessary to show users in the User Statistics who have answered no questions?
ReplyDelete2. After creating a new user, is that new user automatically logged in?
3. After creating a new user, to which page is the user redirected?
4. Should there be a main webpage from which to access each of these individual php files (e.g. a page that just lists all of the links?)
1: Yes
Delete2: Yes
3: None necessarily, but you could provide links to the other pages and they can click them.
4. Up to you. I did not include that in the requirements, because there are few pages.
I'm a bit confused about what questionstats.php is supposed to do. In my reading of the assignment, it looks like it reads through every question and displays the percentage of each possible answer given for each question. It doesn't look like this is tied to the imageid at all. Should question stats show the chart based on imageid or based on questionid?
ReplyDeleteThe statistics should be based on the combinations of questionID and imageID, as recorded in the answer_log table.
DeleteAre we required to show percentages for the answer breakdown for the question statistics, or is that implicit in the pie chart?
ReplyDeleteYes, it would be nice to also post the percentages.
DeleteClarification: In questionstats.php, my expectation was the you would put all question+image combinations and report the statistics there, but I realize that this was not fully spelled out in the description. SO, if you have done it where you only have the statistics per question only (i.e., across all images), then we will accept this as a valid answer.
ReplyDelete