EduploneExam ExamFolder.py,1.19,1.20
Jens Klein <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2254
Modified Files:
ExamFolder.py
Log Message:
added response for session storage
Index: ExamFolder.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/ExamFolder.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ExamFolder.py 15 Dec 2004 14:37:01 -0000 1.19
--- ExamFolder.py 16 Dec 2004 11:01:20 -0000 1.20
***************
*** 7,11 ****
#
# 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
--- 7,11 ----
#
# 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
***************
*** 36,42 ****
class ExamFolder(OrderedBaseFolder):
security = ClassSecurityInfo()
! portal_type = meta_type = 'ExamFolder'
! archetype_name = 'ExamFolder' #this name appears in the 'add' box
! allowed_content_types = []
__implements__ = getattr(OrderedBaseFolder,'__implements__',()) + (IExamContext,)
--- 36,42 ----
class ExamFolder(OrderedBaseFolder):
security = ClassSecurityInfo()
! portal_type = meta_type = 'ExamFolder'
! archetype_name = 'ExamFolder' #this name appears in the 'add' box
! allowed_content_types = []
__implements__ = getattr(OrderedBaseFolder,'__implements__',()) + (IExamContext,)
***************
*** 54,58 ****
),
),
!
StringField('title',
accessor='''Title''',
--- 54,58 ----
),
),
!
StringField('title',
accessor='''Title''',
***************
*** 65,69 ****
),
),
!
),
)
--- 65,69 ----
),
),
!
),
)
***************
*** 92,101 ****
#methods from Interface IExamContext
! def deliverResponse(self, questionUId):
'''
! Returns an object that implements IExamResponse.
'''
!
! pass
#manually created methods
--- 92,109 ----
#methods from Interface IExamContext
! def deliverResponse(self, question, create=False):
'''
! Returns an SimpleResponse object from session space.
'''
! session = self.session_data_manager.getSessionData(create=create)
! if session is not None:
! quid=question.UID()
! userresponse=session.get(quid, SessionResponse())
! session.set(quid, userresponse)
! return userresponse
! elif not create:
! return SessionResponse()
! else:
! return None
#manually created methods
***************
*** 121,130 ****
}
!
actions= (
!
)
!
registerType(ExamFolder)
--- 129,138 ----
}
!
actions= (
!
)
!
registerType(ExamFolder)
***************
*** 133,136 ****
##code-section module-footer #fill in your manual code here
##/code-section module-footer
-
-
--- 141,142 ----
-------------------------------------------------------
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/