Webbserverprogrammering 1

Källkod

Följande filer och mappar finns under mappen webbserverprogrammering.
Mappar visas till vänster och filer till höger. Klicka på en fil eller mapp för att öppna nedan eller visa dess innehåll.

webbserverprogrammering/projects/quiz-extended/

26 filer

admin.php
confirm_account.php
create_account.php
create_quiz.php
css/
dbconnection.php
highscore.php
index.php
js/
logbook.php
login.php
mysql_create_table_options.php
mysql_create_table_questions.php
mysql_create_table_quizzes.php
mysql_create_table_results.php
mysql_create_table_submits.php
mysql_create_table_users.php
plan.php
planering.txt
profile.php
projektrapport.txt
quizzes.php
resources/
result.php
send_email.php
session_variable_array_check.php

planering.txt

143 lines UTF-8 Windows (CRLF)
alrikmz - hejsan123
xX_quizmaster_Xx - hemligt --deleted
admin - hemligt
jelleboi - hejsan123

labb vgy accounts
alrikmz - hejsan123
admin - hemligt
jelleboi - hejsan123



 ¤  unique primary key
 ~  associated table primary key

suggestion
 - difficulty

Todo:
- At login: deny login if user is not verified
- DONE ________ add email as user parameter
- DONE ________ add email as registration parameter (has to be set in POST, email syntax check?)
- DONE ________ at registration: manually make sure email is unique
- DONE ________ at registration: email is added to info that's added into Users Table. Date and verified are auto-defaulted
- DONE ________ at registration: not auto logged in
- NEEDS ATTENTION AT A LATER STAGE ________ at registration: popup saying email sent for verification
- confirm account page, ?id=UID. If unverified: sets user as verified if date is more recent than 15 minutes ago (and redirect to login), else say link expired(send new?). If verified: just redirect to login (so then if session is logged in, it redirects to index, right?)


users
  ¤ user_id
 displayname
 username
 password
 user_level

quizzes
  ¤ quiz_id
  ~ creator_user_id
 quiz_name
 nr_of_questions

questions
  ¤ question_id
  ~ quiz_id
 question_nr
 question_txt
 
options
  ¤ option_id
  ~ question_id
 quiz_id
 option_nr
 option_txt
 correct****
 
 
submits
  ¤ submit_id                        used for "tries" list in ... | NOT SURE here...
 user_id
 quiz_id
 result_id             needed to differentiate between different TRIES
 question_id
 option_id
 
results                   one for each TRY
  ¤ result_id
 user_id
 quiz_id
 points
 max
 
 


SIDOR
 - på alla sidor om inloggad: kunna logga ut, se sitt användarnamn/helst displaynamn


welcome - not logged in
 - log in
 - create account
 - (link) quiz list

welcome - logged in
 - (link) my profile
 - (link) create quiz
 - (link) quiz list

create quiz - (login protected)
 - form for making quiz

my profile (login protected)
 - CHECKED     personal information fr. db
  - display name
  - username
  - user level
 - list of my quizzes (that I have taken, I think)
  - quiz name
  - nr of tries
  - high score / max
  - (link) run quiz
  - (link) more info

quiz result summary (login protected) for one quiz
 - quiz name
 - high score
 - (link) general/global/public statistics
 - list of tries
  - score
  - date
  - (link) see your answers
  
my answers (login protected) for a specific try
 - quiz name
 - score
 - answers
  - question nr
  - question text
  - options (my answer marked red, correct marked green, css priority)
  

quiz list
 - list of quizzes   (if logged in, completed quizzes are marked as completed)
  - quiz name
  - nr of quesions
  - (link) run quiz

general quiz result summary (global)
 - choose between table or bar graph (nr of tries w/ 5 points, and w/ 4 points, etc)
 - list of tries
  - display name
  - score
  - date
  
run quiz
 - quiz name
 - question txt 1 (2, etc etc)
 - choices