EduploneExam/questions FillGapQuestion.py,1.26,1.27
Claudia Disque <[email protected]> Mon, 12 Sep 2005 19:27:26 +0000
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam/questions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22852/questions
Modified Files:
FillGapQuestion.py
Log Message:
added missing i18n attributes
Index: FillGapQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/FillGapQuestion.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** FillGapQuestion.py 9 Jun 2005 09:21:52 -0000 1.26
--- FillGapQuestion.py 12 Sep 2005 19:27:23 -0000 1.27
***************
*** 100,105 ****
""" Returns True if given ID <gapId> is a valid gap. """
basetext = self.getBasetextAsList()
! return basetext[gapId].startswith("<id='") and basetext[gapId].endswith("'>")
def getWordById(self, gapId):
""" Returns word by given ID <gapId>. """
--- 100,109 ----
""" Returns True if given ID <gapId> is a valid gap. """
basetext = self.getBasetextAsList()
! return self.isWordGap(basetext[gapId])
+ def isWordGap(self, word):
+ """ """
+ return word.startswith("<id='") and word.endswith("'>")
+
def getWordById(self, gapId):
""" Returns word by given ID <gapId>. """
***************
*** 138,142 ****
score=0
else:
! score=float(self.getMaxScore()) / possibleCorrect * correctCounter
responseObj.setScore(score)
--- 142,151 ----
score=0
else:
! print self.getMaxScore()
! print possibleCorrect
! print correctCounter
!
! score=float(1)
! #score=float(self.getMaxScore()) / possibleCorrect * correctCounter
responseObj.setScore(score)
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf