EduploneTest/types EduploneTestingEnvironment.py,1.19,1.20
Nils Haagen <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneTest/types
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2125/types
Modified Files:
EduploneTestingEnvironment.py
Log Message:
starting with security
Index: EduploneTestingEnvironment.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneTestingEnvironment.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** EduploneTestingEnvironment.py 8 Nov 2004 11:29:21 -0000 1.19
--- EduploneTestingEnvironment.py 8 Nov 2004 13:01:55 -0000 1.20
***************
*** 11,14 ****
--- 11,16 ----
from Products.EduploneTest.config import *
+ from Products.EduploneTest import Permissions as eXamPermissions
+
if HAS_LINGUA_PLONE:
***************
*** 17,21 ****
from Products.Archetypes.public import *
! from AccessControl import getSecurityManager
from Acquisition import aq_base
from OFS.ObjectManager import _marker, ObjectManager
--- 19,23 ----
from Products.Archetypes.public import *
! from AccessControl import getSecurityManager, ClassSecurityInfo
from Acquisition import aq_base
from OFS.ObjectManager import _marker, ObjectManager
***************
*** 47,56 ****
'name': 'Students',
'action': 'string:${object_url}/users/eduplone_students',
! 'permissions': (CMFCorePermissions.View,)
},
{'id': 'testingResults',
'name': 'Results',
'action': 'string:${object_url}/eduplone_testingResults_global',
! 'permissions': (CMFCorePermissions.View,)
},
#{ 'id': 'imscp_export',
--- 49,58 ----
'name': 'Students',
'action': 'string:${object_url}/users/eduplone_students',
! 'permissions': (eXamPermissions.manageStudents,)
},
{'id': 'testingResults',
'name': 'Results',
'action': 'string:${object_url}/eduplone_testingResults_global',
! 'permissions': (eXamPermissions.viewGlobalResults,)
},
#{ 'id': 'imscp_export',
***************
*** 178,185 ****
#probably needed (^^^^), but i wanted orderedFolder behaviour....
schema = BaseContent.schema + schema
!
! #def folder_contents(self, REQUEST=None):
! # """ """
! # return self.test_environment_contents(REQUEST)
def initializeArchetype(self, **kwargs):
--- 180,186 ----
#probably needed (^^^^), but i wanted orderedFolder behaviour....
schema = BaseContent.schema + schema
!
! security = ClassSecurityInfo()
!
def initializeArchetype(self, **kwargs):
***************
*** 195,204 ****
return result
- def addUserFolder(self):
- """ Adds the user folder """
- self.invokeFactory(id="users", type_name="ATFolder")
- self.users.allowed_content_types = ('eduplone TestMember')
-
- return self.users.view()
def sequence_getLast(self, currentQuestion):
--- 196,199 ----
***************
*** 253,257 ****
return getSecurityManager().getUser()
!
def user_isMember(self):
""" """
--- 248,252 ----
return getSecurityManager().getUser()
! #security.declareProtected(eXamPermissions.viewGlobalResults, 'user_isMember')
def user_isMember(self):
""" """
***************
*** 260,263 ****
--- 255,259 ----
+ security.declareProtected(eXamPermissions.saveAnswers, 'saveQuestionAnswers')
def saveQuestionAnswers(self, REQUEST=None):
""" appends user's answers to his user object """
***************
*** 273,277 ****
#return self.view()
!
def answerAndForward(self, REQUEST=None):
""" stores answers and moves on in the sequence """
--- 269,273 ----
#return self.view()
! security.declareProtected(eXamPermissions.saveAnswers, 'answerAndForward')
def answerAndForward(self, REQUEST=None):
""" stores answers and moves on in the sequence """
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click