Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/cgi-bin/writeQuiz.py
diff options
context:
space:
mode:
Diffstat (limited to 'cgi-bin/writeQuiz.py')
-rwxr-xr-x[-rw-r--r--]cgi-bin/writeQuiz.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/cgi-bin/writeQuiz.py b/cgi-bin/writeQuiz.py
index fc0736e..be645bb 100644..100755
--- a/cgi-bin/writeQuiz.py
+++ b/cgi-bin/writeQuiz.py
@@ -20,14 +20,9 @@ opt = opt + ' title: "Opportunity",}\n'
txt = 'var quiz = {\nfill:[\n' + txt + ']\n};\n\n' + opt + '\n'
print >> log, 'quiz', txt
# write quiz
-if activity[:2] == 'en':
- subject = 'English11'
-else:
- subject = 'Mathematics11'
-milestone = activity[:9]
-tpth = base / subject / milestone / activity / 'js' / 'quiz.js'
-print >> log, 'path', tpth
-fout = open(tpth,'w')
+pth = path(activity) / 'quiz.js'
+print >> log, 'path', pth
+fout = open(pth,'w')
fout.write(txt)
fout.close()
log.close()