Using the Quiz System
Components
-
question_entry.py:
Allows guided data entry of questions and answers for a
particular chapter and section.
Each project will have a script called qentry.sh
that will run the Python script with proper parameters
and do the follow-up steps necessary: if you are on Windows,
you can always look at the script
and do these steps manually.
And someone could create a PowerShell script to do the same
steps...
-
quiz2html.py:
Takes the delimited text files (CSV files, but we aren't
using commas as separators!) and turns them into html code
for inclusion in a web page.
Run it like: ../utils/quiz2html.py quiz1.1.txt > quiz1.1.qhtm
But, you should not have to run this by hand! Use the
makefile in the quizzes directory.
But, better yet, you shouldn't even have to do
that by hand... qentry.sh runs make for you.
-
quiz2test.py:
Takes the delimited text files (CSV files, but we aren't
using commas as separators!) and turns them into
stand-alone files suitable for printing as a test.
-
html_include.awk:
Reads the quizzes into the appropriate web pages.
You will need to enter an include statement in the proper
place in a *.ptml file, like this (take out the slashes
when you use this):
\<\!--include quiz6.2.qhtm -->
-
qexport.py:
Exports quiz content from the database and prints it on screen.
The database configurations are set in mysite/settings.py.
Quiz material for different modules can be filtered by calling
qexport.py <module_name>
-
qimport.py:
Reads a file provided as input and writes them to the database.
-
qexport.sh:
Shell script which set database configurations to prod DB and
calls qexport.py. This script is encrypted using git-crypt for
safe keeping of the database credentials.
A run of the question entry system
Macintosh:algorithms gcallah$ ./qentry.sh
Enter chapter # for question: 4
Enter section # for question: 5
Enter question (blank to stop entering): Using master method (mm), the runtime
for T(n)=3T(n/2)+n2 is:
Enter correct answer (we will randomize for you!): Θ(n2)
Enter a wrong answer (blank to stop entering): Θ(n3/2)
Enter a wrong answer (blank to stop entering): n log n
Enter a wrong answer (blank to stop entering): MM does not apply
Enter a wrong answer (blank to stop entering):
Enter question (blank to stop entering): Using mm, the runtime for T(n) - 2n(n/2) + nn is:
Enter correct answer (we will randomize for you!): MM does not apply
Enter a wrong answer (blank to stop entering): Θ(2n)
Enter a wrong answer (blank to stop entering): Θ(nn)
Enter a wrong answer (blank to stop entering): Θ(n)
Enter a wrong answer (blank to stop entering):
Enter question (blank to stop entering):