EduploneExam/userresponses SimpleResponse.py,1.8,1.9
Jens Klein <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam/userresponses
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2778/userresponses
Modified Files:
SimpleResponse.py
Log Message:
fixed some test
Index: SimpleResponse.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/userresponses/SimpleResponse.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SimpleResponse.py 15 Dec 2004 11:32:31 -0000 1.8
--- SimpleResponse.py 15 Dec 2004 11:55:27 -0000 1.9
***************
*** 12,16 ****
#
# GNU General Public Licence (GPL)
! #
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
--- 12,16 ----
#
# GNU General Public Licence (GPL)
! #
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
***************
*** 39,45 ****
class SimpleResponse(BaseContent):
security = ClassSecurityInfo()
! portal_type = meta_type = 'SimpleResponse'
! archetype_name = 'SimpleResponse' #this name appears in the 'add' box
! allowed_content_types = []
__implements__ = getattr(BaseContent,'__implements__',()) + (IExamResponse,)
--- 39,45 ----
class SimpleResponse(BaseContent):
security = ClassSecurityInfo()
! portal_type = meta_type = 'SimpleResponse'
! archetype_name = 'SimpleResponse' #this name appears in the 'add' box
! allowed_content_types = []
__implements__ = getattr(BaseContent,'__implements__',()) + (IExamResponse,)
***************
*** 52,55 ****
--- 52,57 ----
QUESTION_RELATION='response_to_question'
+ CONTEXT_RELATION='response_to_context'
+
##/code-section class-header
***************
*** 63,67 ****
),
),
!
StringField('title',
accessor='''Title''',
--- 65,69 ----
),
),
!
StringField('title',
accessor='''Title''',
***************
*** 74,78 ****
),
),
!
FloatField('userScore',
widget=DecimalWidget(description='Enter a value for userScore.',
--- 76,80 ----
),
),
!
FloatField('userScore',
widget=DecimalWidget(description='Enter a value for userScore.',
***************
*** 83,87 ****
),
),
!
),
)
--- 85,89 ----
),
),
!
),
)
***************
*** 115,119 ****
def getQuestionTitle(self):
'''
!
'''
return self._questionTitle
--- 117,121 ----
def getQuestionTitle(self):
'''
! returns title of question
'''
return self._questionTitle
***************
*** 122,126 ****
def getQuestionType(self):
'''
!
'''
return self._questionType
--- 124,128 ----
def getQuestionType(self):
'''
! returns type of question
'''
return self._questionType
***************
*** 129,144 ****
def setContext(self,contextobject):
'''
!
'''
!
! pass
!
def getContext(self):
'''
!
'''
!
! pass
--- 131,150 ----
def setContext(self,contextobject):
'''
! set context as a reference
'''
! self.deleteReferences(self.CONTEXT_RELATION)
! self.addReference(contextobject, self.CONTEXT_RELATION)
def getContext(self):
'''
! returns the context object
'''
! refs = self.getRefs(self.CONTEXT_RELATION)
! if refs:
! return refs[0]
! else:
! return None
!
!
***************
*** 161,165 ****
def setScore(self, score):
'''
!
'''
self.setUserScore(score)
--- 167,171 ----
def setScore(self, score):
'''
! sets the user score
'''
self.setUserScore(score)
***************
*** 168,181 ****
def getScore(self):
'''
!
'''
! self.getUserScore()
def getMaxScore(self):
'''
!
'''
-
return self._questionMaxScore
--- 174,186 ----
def getScore(self):
'''
! returns the user score
'''
! return self.getUserScore()
def getMaxScore(self):
'''
! returns the buffered maxscore value
'''
return self._questionMaxScore
***************
*** 192,201 ****
}
!
actions= (
!
)
!
registerType(SimpleResponse)
--- 197,206 ----
}
!
actions= (
!
)
!
registerType(SimpleResponse)
***************
*** 204,207 ****
##code-section module-footer #fill in your manual code here
##/code-section module-footer
-
-
--- 209,210 ----
-------------------------------------------------------
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/