Permalink
Browse files

Question number in JSON bug

  • Loading branch information...
1 parent d1af882 commit 6bf3066f3db908ac8fd9721db54e072c7a1f1c22 @swvist committed Oct 11, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 questiondb.py
View
4 questiondb.py
@@ -11,12 +11,12 @@ class question(db.Model):
opt4 = db.StringProperty(required=True, multiline=True)
ans = db.StringProperty(required=True)
-def getQuestion(num):
+def getQuestion(num,var):
query = question.all()
q = query.filter('questionNumber =',num).get()
if q:
return ("{"+
- "\"num\" : " + "\""+str(num)+"\""+","+
+ "\"num\" : " + "\""+str(var)+"\""+","+
"\"question\" : "+"\""+q.question.replace('\r\n','<br />')+"\""+","+
"\"image\" : "+"\""+q.qimage+"\""+","+
"\"options\" : " + "["+

0 comments on commit 6bf3066

Please sign in to comment.