From 27ddb89df43514bf9b04a3eb4d842160a36e26d2 Mon Sep 17 00:00:00 2001 From: Gerolf Ziegenhain Date: Thu, 28 Aug 2008 17:00:58 +0200 Subject: [PATCH] . --- framework.py | 6 ++---- interface.py | 4 ++++ statistic.py | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/framework.py b/framework.py index ff3678f..fbd3b3f 100644 --- a/framework.py +++ b/framework.py @@ -4,13 +4,11 @@ import random as r class Framework: def AskQuestion(self): if self.method == "BadQuestions": - #FIXME + print "Bad question" qid = self.FindBadQuestion() elif self.method == "GoodQuestions": - #FIXME qid = self.FindGoodQuestion() elif self.method == "NewQuestions": - #FIXME qid = self.FindNewQuestion() else: qid = self.FindAnyQuestion() @@ -66,7 +64,7 @@ class Framework: if not (q[0] in self.s.newquestion): self.s.newquestion.append (q[0]) self.s.nnewquestion+=1 - print self.q.nquestions,self.s.ngoodquestion,self.s.nbadquestion,self.s.nnewquestion + print "total, good, bad, new:",self.q.nquestions,self.s.ngoodquestion,self.s.nbadquestion,self.s.nnewquestion def __init__(self,method="",catalog="TechnikA"): if catalog == "TechnikA": diff --git a/interface.py b/interface.py index 3148705..cca9d90 100755 --- a/interface.py +++ b/interface.py @@ -90,6 +90,9 @@ class MyHandler(BaseHTTPRequestHandler): elif self.path.endswith("methodBad.afu"): f.Method ("BadQuestions") self.AskQuestion() + elif self.path.endswith("methodAny.afu"): + f.Method ("AnyQuestions") + self.AskQuestion() elif self.path.endswith("methodGood.afu"): f.Method ("GoodQuestions") self.AskQuestion() @@ -122,6 +125,7 @@ class MyHandler(BaseHTTPRequestHandler): self.ShowHead() self.wfile.write ("

Abfragemethode

") self.wfile.write ("