EduploneTest/types EduploneTestingEnvironment.py,1.24,1.25
"Fabian K." <[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-serv12920
Modified Files:
EduploneTestingEnvironment.py
Log Message:
Hides userfolder in the navigation bar when a new test is created
Index: EduploneTestingEnvironment.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneTestingEnvironment.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** EduploneTestingEnvironment.py 2 Jan 2005 22:46:27 -0000 1.24
--- EduploneTestingEnvironment.py 3 Jan 2005 13:13:28 -0000 1.25
***************
*** 360,367 ****
def initializeArchetype(self, **kwargs):
OrderedBaseFolder.initializeArchetype(self, **kwargs)
self.invokeFactory(id="users", type_name="eduplone TestMemberFolder")
self.users._addTestMembers([self.getCurrentUser().getId()], 2)
! #self.users.invokeFactory(id=self.getCurrentUser().getId(), type_name="eduplone TestMember")
def fixedObjectValues(self):
--- 360,381 ----
def initializeArchetype(self, **kwargs):
+ # Initialize archetype
OrderedBaseFolder.initializeArchetype(self, **kwargs)
+
+ # Create userfolder and add current user
self.invokeFactory(id="users", type_name="eduplone TestMemberFolder")
self.users._addTestMembers([self.getCurrentUser().getId()], 2)
!
! # Tricky part .. hide the userfolder in the navigation bar by
! # converting idsNotToList into an array, appending the right
! # value, then re-converting it into a tuple.
! # And yes, it _must_ be a tuple for some reason.
! if "users" not in self.portal_properties.navtree_properties.idsNotToList:
! ids_not_to_list_array = []
! [ ids_not_to_list_array.append(id_not_to_list) for id_not_to_list in self.portal_properties.navtree_properties.idsNotToList ]
! ids_not_to_list_array.append("users")
! ids_not_to_list_tuple = tuple(ids_not_to_list_array)
! self.portal_properties.navtree_properties.idsNotToList = ids_not_to_list_tuple
!
def fixedObjectValues(self):
***************
*** 682,690 ****
return str(TotalScore)
-
- def blubb(self):
- """ """
- return self.rolesSeeContentsView
-
def testIsRunning(self):
--- 696,699 ----
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt