Author |
Topic |
cripto9t
Average Member
USA
881 Posts |
Posted - 04 February 2007 : 15:27:21
|
Quizzer1 1.0.01 Beta for testing only.
Download - Right Click and Save
Tested on Snitz 3.4.6 with a mySql db.
Snitz users are needed to download and test my quiz mod for snitz. It's an add-on, meaning there are very few changes to the original forum code. It is also a very easy install, just a few new files to add to your forum folder and a database update to add the quiz tables.
I would like to get the existing features tested and working properly before I try to add anymore. I will try to update the zip once a week until a final release is reached.
Feedback, suggestions and constructive criticism are welcome.
I'll post Updates Here
Updates
- 2/4/07 - 1.0.0 Beta (Initial Release)
- 2/5/07 - 1.0.01 Beta (Update for my friends with access)
Notes
- This version of the quiz Quizzer 1 does not and will not record members score. That will be for Quizzer 2.
- There is no test forum
Quiz Description - Features
- Admin on/off switch
- Unlimited questions and choices with admin control
- Multiple choice and true/false quiz options
- Admins and/or Moderators write quizzes (admin control)
- "Members only" or "all vistors" option with Admin control
- Retake time limits with Admin control (uses cookies)
- Random questions with Admin control
- Option to show corrected answers after grading
- Records number of entries, hi-score, average score and last date taken for each quiz
- Active Quiz Page
- Use forum code in questions and answers
- "Save quiz as draft" option
- Quiz Archive
- A very primitive attempt at question templates
- Wish List
- Topic Quizzes
- Member Input Questions
- Essay Questions
- Quiz Categories
- Real Question Templates
- Question Paging
- Printer Friendly
< |
_-/Cripto9t\-_ |
Edited by - cripto9t on 05 February 2007 17:14:50 |
|
runsh
Starting Member
34 Posts |
Posted - 04 February 2007 : 16:26:23
|
Thanks for the mod. I installed the mod but have problem making quizes active. on admin I turned quizes on several time but it resets to off. I use access db. I use 3.4.06 version. any idea why < |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 04 February 2007 : 16:53:11
|
Did you make the changes from the read-me in "config.asp"?< |
_-/Cripto9t\-_ |
|
|
runsh
Starting Member
34 Posts |
Posted - 04 February 2007 : 17:37:43
|
yes I did. I'll try with fresh copy of snitz again.< |
|
|
runsh
Starting Member
34 Posts |
Posted - 04 February 2007 : 18:11:38
|
I installed a new copy of forum and added the mod. now it truns quiz on but when try to access active quizzes I get this error: Microsoft JET Database Engine error '80040e14'
Join expression not supported.
/froumq/quiz_active.asp, line 72 < |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 04 February 2007 : 18:16:08
|
Also I forgot to ask , did you install the table in admin options>mod setup? If you did look in admin options >forum variables and look for the quiz variables in the list. They start with "STRQUIZ" and make sure they are listed. If not try running the Database update again.
I might not be around for the rest of the night. The Super Bowl is about to start.
GO COLTS!!!!!!!!!!< |
_-/Cripto9t\-_ |
|
|
runsh
Starting Member
34 Posts |
Posted - 04 February 2007 : 19:25:25
|
yes setup is fine, is listed in variable. I think there is a problem with generated tables in db, look at this image from generated db table!!
< |
|
|
runsh
Starting Member
34 Posts |
Posted - 04 February 2007 : 19:51:45
|
Microsoft JET Database Engine error '80040e14'
Join expression not supported.
/froumq/quiz.asp, line 81 < |
|
|
runsh
Starting Member
34 Posts |
|
cripto9t
Average Member
USA
881 Posts |
Posted - 05 February 2007 : 07:08:37
|
runsh, in "quiz_active.asp" replace this code
strSql = "SELECT QUIZ_ID, Q_AUTHOR, Q_TITLE, Q_DATE, Q_STATUS, Q_TYPE, Q_QUESTIONS, Q_ENTRIES, Q_HISCORE, Q_ACED, Q_AVERAGE, Q_LAST_QUIZ, Q_RETAKE, Q_ANON, Q_RANDOM, Q_RANDOM_QUESTIONS, M_NAME, Q_DESCRIPTION" & _
" FROM " & strTablePrefix & "QUIZ" & _
" LEFT JOIN " & strTablePrefix & "MEMBERS" & _
" ON Q_AUTHOR = MEMBER_ID" & _
" WHERE Q_STATUS = " & PageView
if PageView = 0 then strSql = strSql & " AND Q_AUTHOR = " & MemberID
strSql = strSql & " ORDER BY QUIZ_ID DESC;" With this
strSql = "SELECT QUIZ_ID, Q_AUTHOR, Q_TITLE, Q_DATE, Q_STATUS, Q_TYPE, Q_QUESTIONS, Q_ENTRIES, Q_HISCORE, Q_ACED, Q_AVERAGE, Q_LAST_QUIZ, Q_RETAKE, Q_ANON, Q_RANDOM, Q_RANDOM_QUESTIONS, M_NAME, Q_DESCRIPTION" & _
" FROM " & strTablePrefix & "QUIZ, " & strMemberTablePrefix & "MEMBERS" & _
" WHERE Q_STATUS = " & PageView & " AND Q_AUTHOR = MEMBER_ID"
if PageView = 0 then strSql = strSql & " AND Q_AUTHOR = " & MemberID
strSql = strSql & " ORDER BY QUIZ_ID DESC;" Let me know if it works. I want this to work all around.< |
_-/Cripto9t\-_ |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 05 February 2007 : 08:43:43
|
I have no way to test with access. Does anyone with access knowledge see why the first query above would get that error? strTablePrefix should be strMemberTablePrefix - That might be the problem if the prefix was changed in config.asp.< |
_-/Cripto9t\-_ |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 05 February 2007 : 09:49:20
|
Don't know, but I'll give it a shot later today.< |
|
|
runsh
Starting Member
34 Posts |
Posted - 05 February 2007 : 10:48:57
|
Now it gives this error Microsoft VBScript runtime error '800a005e' Invalid use of Null: 'cSng' /froumq/quiz_active.asp, line 339
and when I add quiz it gives this error
Microsoft JET Database Engine error '80004005'
The field 'FORUM_QUIZ.Q_RANDOM_QUESTIONS' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field.
/froumq/quiz_post.asp, line 255 < |
|
|
runsh
Starting Member
34 Posts |
Posted - 05 February 2007 : 11:00:20
|
I think this part in quiz.asp also should be change, gives error:
'## Quiz Page Sql strSql = "SELECT QUIZ_ID, Q_AUTHOR, Q_TITLE, Q_DATE, Q_STATUS, Q_QUESTIONS, Q_CHOICES, Q_TEMPLATE, Q_ENTRIES, Q_RETAKE," & _ " Q_RANDOM_QUESTIONS, Q_RANDOM, Q_ANON, M_NAME, Q_DESCRIPTION" & _ " FROM " & strTablePrefix & "QUIZ Q" & _ " LEFT JOIN " & strTablePrefix & "MEMBERS" & _ " ON Q_AUTHOR = MEMBER_ID" & _ " WHERE QUIZ_ID = " & QuizID '& " AND Q_STATUS = 1"
this is the error Microsoft JET Database Engine error '80040e14'
Join expression not supported.
/froumq/quiz.asp, line 81 < |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 05 February 2007 : 12:04:05
|
runsh, in "quiz_active.asp" find this function at the bottom of the page
function getAverage(qa)
dim arrAvg, lAvg, uAvg
arrAvg = split((cSng(qa) * 100),".")
lAvg = arrAvg(0)
'uAvg = arrAvg(1)
'if cLng(left(uAvg,1)) > 5 then
' lAvg = cLng(lAvg) + 1
'end if
'lAvg = lAvg & "%"
getAverage = lBound(arrAvg)
end function replace it with this
function getAverage(qa)
dim tmpStr
tmpStr = cInt(qa * 100)
tmpStr = tmpStr & "%"
getAverage = tmpStr
end function I think that will take care of one error . I'll look at the null error now< |
_-/Cripto9t\-_ |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 05 February 2007 : 12:42:24
|
For the random question error, in quiz_post.asp find this code around line 130
if strQuizRandom = "1" and intRandom > 0 then
if chkInput(Request.Form("Quiz_RandomQuestions")) = 1 then
getRandomQuestions = 1
intRandomQuestions = cLng(Request.Form("Quiz_RandomQuestions"))
end if
else
getRandomQuestions = 0
end if replace it with this
if chkInput(Request.Form("Quiz_RandomQuestions")) = 1 then
intRandomQuestions = cLng(Request.Form("Quiz_RandomQuestions"))
end if And fin d this around line 220
'## Add quiz info to quiz table
strSql = "INSERT INTO " & strTablePrefix & "QUIZ" & _
" (Q_AUTHOR" & _
", Q_TITLE" & _
", Q_DESCRIPTION" & _
", Q_DATE" & _
", Q_STATUS" & _
", Q_TYPE" & _
", Q_QUESTIONS" & _
", Q_CHOICES" & _
", Q_TEMPLATE" & _
", Q_CORRECTIONS" & _
", Q_RETAKE" & _
", Q_ANON" & _
", Q_RANDOM"
if getRandomQuestions = 1 then strSql = strSql & ", Q_RANDOM_QUESTIONS"
strSql = strSql & ") VALUES (" & _
"" & MemberID & _
", '" & strTitle & "'" & _
", '" & strDescription & "'" & _
", '" & dateToStr(strForumTimeAdjust) & "'" & _
", " & intStatus & _
", " & intType & _
", " & Q_Cnt & _
", " & intChoices & _
", '" & strTemplate & "'" & _
", " & intCorrections & _
", " & intRetake & _
", " & intAnon & _
", " & intRandom
if getRandomQuestions = 1 then
if intRandomQuestions > Q_Cnt then
strSql = strSql & ", " & Q_Cnt
else
strSql = strSql & ", " & intRandomQuestions
end if
end if
strSql = strSql & ")" Replace that with this
'## Add quiz info to quiz table
strSql = "INSERT INTO " & strTablePrefix & "QUIZ" & _
" (Q_AUTHOR" & _
", Q_TITLE" & _
", Q_DESCRIPTION" & _
", Q_DATE" & _
", Q_STATUS" & _
", Q_TYPE" & _
", Q_QUESTIONS" & _
", Q_CHOICES" & _
", Q_TEMPLATE" & _
", Q_CORRECTIONS" & _
", Q_RETAKE" & _
", Q_ANON" & _
", Q_RANDOM" & _
", Q_RANDOM_QUESTIONS" & _
") VALUES (" & _
"" & MemberID & _
", '" & strTitle & "'" & _
", '" & strDescription & "'" & _
", '" & dateToStr(strForumTimeAdjust) & "'" & _
", " & intStatus & _
", " & intType & _
", " & Q_Cnt & _
", " & intChoices & _
", '" & strTemplate & "'" & _
", " & intCorrections & _
", " & intRetake & _
", " & intAnon & _
", " & intRandom
if intRandomQuestions > Q_Cnt then
strSql = strSql & ", " & Q_Cnt
else
strSql = strSql & ", " & intRandomQuestions
end if
strSql = strSql & ")" < |
_-/Cripto9t\-_ |
|
|
Topic |
|
|
|