From f09967647ace4db1781db282852007241828b396 Mon Sep 17 00:00:00 2001 From: Gerolf Ziegenhain Date: Tue, 26 Aug 2008 16:06:01 +0200 Subject: [PATCH] . --- statistic.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/statistic.py b/statistic.py index f08c7c2..6c5fbcb 100644 --- a/statistic.py +++ b/statistic.py @@ -14,27 +14,32 @@ class Statistic: c = int(q.getAttribute ("c")) w = int(q.getAttribute ("w")) + cs = int(q.getAttribute ("cs")) + ws = int(q.getAttribute ("ws")) if how == True: c += 1 + cs += 1 else: w += 1 + ws += 1 q.setAttribute("c",str(c).encode("utf8")) q.setAttribute("w",str(w).encode("utf8")) + q.setAttribute("cs",str(cs).encode("utf8")) + q.setAttribute("ws",str(ws).encode("utf8")) - cs = q.getAttribute ("cs") #FIXME - ws = q.getAttribute ("ws") #FIXME t = self.Timestamp() a = [1,2,4,8][(["a","b","c","d"]).index(answer)] nt = 15000 # FIXME - qq = q.createElement ("answer_clicked") - qq.setAttribute ("datetime", str(t).encode("utf8")) - qq.setAttribute ("answer_code", str(a).encode("utf8")) - qq.setAttribute ("needed_time", str(nt).encode("utf8")) - qq.appendChild() + # FIXME + #qq = q.createElement ("answer_clicked") + #qq.setAttribute ("datetime", str(t).encode("utf8")) + #qq.setAttribute ("answer_code", str(a).encode("utf8")) + #qq.setAttribute ("needed_time", str(nt).encode("utf8")) + #qq.appendChild() print "Yeas",qid,id,c,cs,ws,w,t -- 2.11.4.GIT