-
Notifications
You must be signed in to change notification settings - Fork 4
/
UsingQuizSystem.html
113 lines (106 loc) · 4.26 KB
/
UsingQuizSystem.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css"/>
<title>
Using the Quiz System
</title>
</head>
<body>
<h1>
Using the Quiz System
</h1>
<h2>
Components
</h2>
<ul>
<li>
<b>question_entry.py</b>:
Allows guided data entry of questions and answers for a
particular chapter and section.
<br />
Each project will have a script called <b>qentry.sh</b>
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...
</li>
<li>
<b>quiz2html.py</b>:
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.
<br />
Run it like: ../utils/quiz2html.py quiz1.1.txt > quiz1.1.qhtm
<br />
<b>But</b>, you should not have to run this by hand! Use the
<i>makefile</i> in the quizzes directory.
<br />
<b>But</b>, better yet, you shouldn't even have to do
that by hand... <i>qentry.sh</i> runs make for you.
</li>
<li>
<b>quiz2test.py</b>:
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.
</li>
<li>
<b>html_include.awk</b>:
Reads the quizzes into the appropriate web pages.
You will need to enter an include statement in the proper
place in a <i>*.ptml</i> file, like this (take out the slashes
when you use this):
<br />
<code>
\<\!--include quiz6.2.qhtm -->
</code>
</li>
<li>
<b>qexport.py</b>:
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>
</li>
<li>
<b>qimport.py</b>:
Reads a file provided as input and writes them to the database.
</li>
<li>
<b>qexport.sh</b>:
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.
</li>
</ul>
<h2>
A run of the question entry system
</h2>
<p>
<pre>
<code>
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)+n<sup>2</sup> is:
Enter correct answer (we will randomize for you!): Θ(n<sup>2</sup>)
Enter a wrong answer (blank to stop entering): Θ(n<sup>3/2</sup>)
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) - 2<sup>n</sup>(n/2) + n<sup>n</sup> is:
Enter correct answer (we will randomize for you!): MM does not apply
Enter a wrong answer (blank to stop entering): Θ(2<sup>n</sup>)
Enter a wrong answer (blank to stop entering): Θ(n<sup>n</sup>)
Enter a wrong answer (blank to stop entering): Θ(n)
Enter a wrong answer (blank to stop entering):
Enter question (blank to stop entering):
</code>
</pre>
</p>
</body>
</html>