Quiz

CornMaster

Romulan Commander
Retired Moderator
Joined
Nov 19, 2000
Messages
3,761
Location
Cloaked Warbird in the Neutral Zone
This is where we will discuss the modular quiz I'm going to attempt to program in Visual Basic.

So first off.......The look and layout of the quiz.
I was thinking of one screen that could be reusable. Load the questions into the same form each time. But that didn't work.
So then I figured I could make 50 indentical forms, except each one would load different questions and answers. This would work but it would make the program bigger, but more customizible.

The layout of the question files will look something like this:
[question1]
question=The question would be written here.
answer1=Answer1
if1selected=Correct. Score. Interesting Fact.
value=2
answer2=Answer2
if2selected=Correct. Score. Interesting Fact.
value=1
answer3=Answer3
if3selected=Incorrect. Score. Interesting Fact.
value=0
answer4=null
if4selected=null
value=null
answer5=null
if5selected=null
value=null
max=2
endoftest=no


Now I'll explain it.
The "[question1]" is just the question number. Then the "answer1" through "answer5" are the answers that will appear. If it equals "null" then no answer will be shown. "if?selected=???" this is what it will show you when you select your answer. The "value=?" is how much each question is worth. "max=?" is the maximum points the question can score you. This will come in handy when trying to calculate the %'age. This value will be added to a variable called "tot" or something. And "endoftest=yes/no" this would tell the program when the end of the test is and when to calculate the final score/show the last screen with the custom names/ranks for the scores.

Do you think I'm missing anything??

Now...at the very beginning we would be able to choose the set of questions you want to use. They would have a special extention...like .cqq or something. (Cool Quiz Questions) :)

I will eventually write a program that will allow you to write the questions in an easy to use interface. It will be cool ass too, but for now that's on the back burner.

So anything else I should meantion? Hummm....Maybe I can design multiple interfaces. A professional, LCARS, Civ Theme....and then there could be an option for that at the beginning of the file....like:
[interface]
type=lcars

This would trigger a series of forms with a Star Trek feel. Although the code will be indentical the layout will differ. Of course...this make the program bigger too. But once you have the program the question files will only be a few KB's!!!
 
DAM IT JIM!
i'm a network administrator not a programer!!
 
Ah, wow.
I am getting this CCNA books, but that stuff you just spouted really tied my brain in loops (couldn't figure out how to spell nots? knots?). Thanks a heap ;)
 
In your other post, you said you didn't know how to use Matricies.

But what you are doing lends itself to the forte of matrix manipulation. The whole idea is to write a generic "quiz engine", with the data a modular, maintainable data format.

Your approach will work (the cut and paste method), and when you get that doing, you may still want to give the recursive quiz engine a try.

As an example, take a look at the Civ II rules.txt file. All that info is read into the Civ II matricies when you run a game. See the patterns in it? Look at the units and terrain info. You "program" the units and terrain by simply changing a text file... it usually beats altering the program itself.

If you want to imbed the quiz data in the quiz program itself, just maintain the data for each quiz separately, then cut and paste it into the end of the program (data statements should do) when you want to release a given quiz.

And if you would like to have a certain file extension, like .cmq (CornMasterQuiz ;) ), then you can easily scramble the data to keep the file from being "peeked at" by the casual user. Some easy methods are bit shifts, ASCII shifts, XORs, etc. Don't get complicated, though. You'll need to write a simple "encoding" program to write the shifted file, and the quize program itself could read and unshift the incoming data.

This method would allow you to distribute .cmq files without the program... people want to take a quiz? Just D/l the .cmq (very tiny, BTW). This will also let you compile the source code into an .exe file.

PS, Start off with plain, unshifted (unencoded) data files, though.

Anyway, these are just ideas for you. :)

america1s.jpg
 
I think I've done that. I written the "quiz engine". It's a 44 kb program that will read and record the score for an unlimited unmber of questions. I've also written the quiz maker. That can write .cqq (Cool Quiz Questions ;)) files. It's 64 kb and it writes the files so they don't have the be coded in Notepad like the original.

I'll add a .cqq file that was made by the program. I'm guessing it won't need much encryption. ;)

But that is diffently something I'd like to add.


Don't Mind This Mumbling.....I'm testing my code at work and writing the bugs/fixes here.
~~~~~~~~~~~~~~~~~~~~~~~
QuizMaker
---------
Add ability to edit the info for each question. - Fixed and Redesigned. :D
While saving make answers that aren't used to = "null" - Fixed
Center the forms on the screen. - Fixed
Add ranking addition to the end
Find a better way to save ---> to next form. - Redesigned. And much better BTW.
Fix horrible memory leak that caused me to loose my work. :mad: By adding unload commands when the "X" is pressed. - Fixed
Set focus to title on the "basicinfo" screen. - Fixed
Added icon for the program. - :D

Quizzer
-------
In loading of the questions add check for "null" to questions 1 and 2. - Fixed
Add ranking calculation to the end.
Fix horrible memory leak that caused me to loose my work. :mad: By adding unload commands when the "X" is pressed. -Fixed on 3 of 4 forms.
Added icon for the program. - :D

Now you guys are seeing the programming bug kill process!!! ;)
 
More bugs to fix.

Quiz Maker
~~~~~~~~~~~
Center the title and question boxes
Add rank calculation
Fix up basic info screen and make it grid like.
Add an Exit button to the bottom
Need to write "endoftest=no" if end of test check box ISN'T checked.

Quizzer
~~~~~~~~
Add rank calculation
Design LCARS interface
Add an Exit button to the bottom
 
Well...here it is. A beta for quiz maker and quizzer. Also 2 sample quizes and a .wav that the program must have. Enjoy. :D

Edit: There is also one more bug I know of. The More info window won't accept the "enter" key on the quiz maker. It accepts it but won't record anything afterwards.

New version. It's the completed version!!!! Everything works. Just have to squash remaining bugs and then it should be ready to release!!!

Yeah!!!
 
Doh!! More Bugs!!!

Quizzer
~~~~~~
The LCARS form doesn't show the Caption. - Fixed
Need to make a final ranking form in LCARS style. -Fixing
Disable Maximize - Fixed
Make more room for the % box and the Rank display. - Fixed
Add code below for ending via the X. This will eliminate need to Exit button and stop the memory leak. - Fixed

Quiz Maker
~~~~~~~~~
The more info box doesn't properly write the [enter] key to the .cqq file.
Disable Maximize - Fixed
Add code below for ending via the X. This will eliminate need to Exit button and stop the memory leak. - Fixed


Use this code for Ending the program via the "X":
---------------------------
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu Then
End
End If
End Sub
----------------------------

My 6th edit. Did I meantion I HATE bugs!!!
 
And the latest version. Has all but one bug squashed!

As someone was testing for me...he found several bugs. They are now fixed. Also added password protection. So if you don't want other people editing your quizzes you can protect them.

:D

Thanks for the comments starlifter. I'll check the PM ASAP.
 
think it's outstanding! It is very easy for a test-taker to use... your work really is great! I'll bet that with your quizmaker, there might be a small niche of people that would like to make their own quizzes.

I also really like how an individual data file can be selected! I think that is the best solution, as the whole program need not be duplicated for every new quiz.

BTW, I mentioned some sort of compression or encryption of the data file in a PM.

Nice Job!!

america1s.jpg
 
Originally posted by CornMaster
I just saw a really cool sig on the VisualBasic Forum:
"If at first, you don't succed, call it version 1.0."
:D

Or, If at first you don't succed, make sure you charge for the upgrade.
 
Now that I'm nearing completion (Except for tweaking....of course)...what type of Help system should I use?? For my last program I created my own...but it wasn't too good. I've also created HTML based ones. I've started making this one...but does anyone have any other suggestions???
 
Well....three weeks later and I've done a little more than tweaking. :D
  • I've added advanced error checking all over the place. So that your values, are checked to make sure they add up. The boxes are checked to make sure something is typed in there, etc...
  • I've added a new type of question. Matching. You have 5 items in one column and 5 in the other....you need to match them up in order to score points.
  • I've nearly completed a help file for it!
  • I redesigned the Basic Info screen and the question windows (Matching takes up more space. ;)
  • And I've totally added encryption!!!

That's just a partial list of course...I can't remember everything I've changed over the last 3 weeks. Anyway...here is Cool Quiz, Version Beta 1.9.5

Edit: I deleted the attachment, because I've released version 1.99. But it's 1 MB and too big to upload. :(
 
Back
Top Bottom