EduploneExam/answers MathAnswer.py,1.24,1.25
Nils Haagen <[email protected]> Fri, 25 Feb 2005 16:10:54 +0000
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam/answers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21336/answers
Modified Files:
MathAnswer.py
Log Message:
bugfix for mathquestion; letters are accepted, but wrong...
Index: MathAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/MathAnswer.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** MathAnswer.py 25 Feb 2005 13:42:52 -0000 1.24
--- MathAnswer.py 25 Feb 2005 16:10:51 -0000 1.25
***************
*** 81,89 ****
'''
range = (self.getCorrect()-self.getTolerance(), self.getCorrect()+self.getTolerance())
! print range
! print value
! #print float(value) >= range[0]
! #print float(value) <= range[1]
!
if value and float(value) and float(value) >= range[0] and float(value) <= range[1] :
return True
--- 81,89 ----
'''
range = (self.getCorrect()-self.getTolerance(), self.getCorrect()+self.getTolerance())
! try:
! float(value)
! except:
! return False
!
if value and float(value) and float(value) >= range[0] and float(value) <= range[1] :
return True
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click