EduploneExam/answers BlindGapAnswer.py,1.7,1.8 BooleanAnswer.py,1.6,1.7 TextLineAnswer.py,1.1,1.2 TextTaskAnswer.py,1.7,1.8

Nils Haagen <[email protected]>
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-serv12758/answers

Modified Files:
	BlindGapAnswer.py BooleanAnswer.py TextLineAnswer.py 
	TextTaskAnswer.py 
Log Message:
processValue for abstract class TextLineAnswer 

Index: TextLineAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/TextLineAnswer.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TextLineAnswer.py	14 Dec 2004 16:50:30 -0000	1.1
--- TextLineAnswer.py	14 Dec 2004 16:58:23 -0000	1.2
***************
*** 96,105 ****
      #methods from Interface IExamAnswer
  
!     def processValue(self):
          '''
          
          '''
!         
!         pass
  
  
--- 96,117 ----
      #methods from Interface IExamAnswer
  
!     def processValue(self, value=''):
          '''
          
          '''
!         if not self.caseSensitive:
!             li=[]
!             for i in self.correct:
!                 li.append(i.lower())
!             
!             value=value.lower()
!             
!         else:
!             li=self.correct
!             
!         if value and value in li: 
!             return True
!         else: 
!             return False
  
  

Index: BlindGapAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/BlindGapAnswer.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** BlindGapAnswer.py	14 Dec 2004 16:50:30 -0000	1.7
--- BlindGapAnswer.py	14 Dec 2004 16:58:23 -0000	1.8
***************
*** 75,98 ****
      )
  
-     #Methods
-     #manually created methods
- 
-     def processValue(self, value=None):
-         '''
-         
-         '''
-         if self.caseSensitive:
-             li=[]
-             for i in self.correct:
-                 li.append(i.lower())
-         else:
-             li=self.correct
-             
-         if value and value in li: 
-             return True
-         else: 
-             return False
- 
- 
  
      # uncomment lines below when you need
--- 75,78 ----

Index: TextTaskAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/TextTaskAnswer.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TextTaskAnswer.py	14 Dec 2004 16:50:30 -0000	1.7
--- TextTaskAnswer.py	14 Dec 2004 16:58:23 -0000	1.8
***************
*** 75,98 ****
      )
  
-     #Methods
-     #manually created methods
- 
-     def processValue(self):
-         '''
-         
-         '''
-         
-         if self.caseSensitive:
-             li=[]
-             for i in self.correct:
-                 li.append(i.lower())
-         else:
-             li=self.correct
-             
-         if value and value in li: 
-             return True
-         else: 
-             return False
- 
  
  
--- 75,78 ----

Index: BooleanAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/answers/BooleanAnswer.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** BooleanAnswer.py	14 Dec 2004 16:50:30 -0000	1.6
--- BooleanAnswer.py	14 Dec 2004 16:58:23 -0000	1.7
***************
*** 128,131 ****
--- 128,133 ----
          if type(value) in StringTypes and value.lower() in ['0', 'false']:
              value=False
+         if type(value) in StringTypes and value.lower() in ['on', 'true']:
+             value=True
  
          if value:



-------------------------------------------------------
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://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.