Forum Discussion
Michielvan-d058
13 years agoCommunity Member
Storing QuizMaker results in a database
I am an ICT teacher at a school, and have created a solution to save all results to a database automatically after the quiz. I am using a MS SQL Server database, but it could easily be adapted to a...
Michielvan-d058
13 years agoCommunity Member
from line 35 of quiz.asp:
' if the network user is known, use that name
options.username = Request.ServerVariables("LOGON_USER")
' otherwise, use the name given at the end of the test
If options.username = "" Then
options.username = Req("quiz[oOptions][strName]")
End If
' otherwise, use the session ID as an identifying name
' in this case, the student cannot be tracked!
If options.username = "" Then
options.username = "Session-" & Session.SessionID
End If
So you could also have a user name in a session variable and throw that in, e.g.
if Session("UserName")<>"" Then
options.username = Session("UserName")
end if
I haven't bothered to do this, since I track the login name on the network already. This is the safest way anyway. You could also map a list of usernames to their network login ids, so you could filter it later.