EduploneTest/types EduploneFreeText.py,1.3,1.4 EduploneFreeTextAnswer.py,1.3,1.4 EduploneMatching.py,1.2,1.3 EduploneMultiChoice.py,1.2,1.3 EduploneSingleChoice.py,1.2,1.3 EduploneTestingEnvironment.py,1.5,1.6 EduploneTextTask.py,1.2,1.3 EduploneTrueFalse.py,1.2,1.3

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-serv28800/types

Modified Files:
	EduploneFreeText.py EduploneFreeTextAnswer.py 
	EduploneMatching.py EduploneMultiChoice.py 
	EduploneSingleChoice.py EduploneTestingEnvironment.py 
	EduploneTextTask.py EduploneTrueFalse.py 
Log Message:
auto-generating title for answers now, german .po-file, smaller fixes

Index: EduploneMultiChoice.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneMultiChoice.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EduploneMultiChoice.py	29 Sep 2004 11:25:04 -0000	1.2
--- EduploneMultiChoice.py	7 Oct 2004 16:50:40 -0000	1.3
***************
*** 63,66 ****
      global_allow = 0    
      filter_content_types = 1
!    
  registerType(EduploneMultiChoice)
--- 63,72 ----
      global_allow = 0    
      filter_content_types = 1
! 
!     oldInvokeFactory=PARENT.invokeFactory
!     def invokeFactory(self, type_name, id, RESPONSE=None, *args, **kw):
! 	""" set a default title"""
! 	defTitle='Answer' + str(len(self.objectValues())+1) #let's not start counting at zero for user-view...
! 	return self.oldInvokeFactory(type_name, id, RESPONSE, title=defTitle, *args, **kw)
! 			        
  registerType(EduploneMultiChoice)

Index: EduploneTestingEnvironment.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneTestingEnvironment.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** EduploneTestingEnvironment.py	5 Oct 2004 18:19:08 -0000	1.5
--- EduploneTestingEnvironment.py	7 Oct 2004 16:50:40 -0000	1.6
***************
*** 86,89 ****
--- 86,99 ----
      ),
      BooleanField(
+         'verifymembership',
+         default = 1,
+         widget = BooleanWidget(label = "Confirm the user",
+                                label_msgid='label_validate_users',
+                                description = "Users that listed them themselves have first to be confirmed by the teacher (only for a public test)",
+                                description_msgid='help_validate_users',
+                                i18n_domain='eduplone'),
+         #schemata='Flow'
+     ),
+     BooleanField(
          'showpoints',
          default = 0,
***************
*** 105,118 ****
  #       schemata='Flow'
      ),
!     BooleanField(
!         'verifymembership',
!         default = 1,
!         widget = BooleanWidget(label = "Confirm the user",
!                                label_msgid='label_validate_users',
!                                description = "Users that listed them themselves have first to be confirmed by the teacher (only for a public test)",
!                                description_msgid='help_validate_users',
!                                i18n_domain='eduplone'),
!         #schemata='Flow'
!     ),
      DateTimeField(
          'starttime',
--- 115,119 ----
  #       schemata='Flow'
      ),
!     
      DateTimeField(
          'starttime',

Index: EduploneTrueFalse.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneTrueFalse.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EduploneTrueFalse.py	29 Sep 2004 11:25:04 -0000	1.2
--- EduploneTrueFalse.py	7 Oct 2004 16:50:40 -0000	1.3
***************
*** 36,40 ****
  )
  
! 
  actions =( \
  
--- 36,40 ----
  )
  
! 			     
  actions =( \
  
***************
*** 62,65 ****
--- 62,70 ----
      global_allow = 0
  
+     oldInvokeFactory=PARENT.invokeFactory
+     def invokeFactory(self, type_name, id, RESPONSE=None, *args, **kw):
+         """ set a default title"""
+ 	defTitle='Answer' + str(len(self.objectValues())+1) #let's not start counting at zero for user-view...
+ 	return self.oldInvokeFactory(type_name, id, RESPONSE, title=defTitle, *args, **kw)
              
  registerType(EduploneTrueFalse)

Index: EduploneFreeText.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneFreeText.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EduploneFreeText.py	29 Sep 2004 11:25:04 -0000	1.3
--- EduploneFreeText.py	7 Oct 2004 16:50:40 -0000	1.4
***************
*** 51,55 ****
      schema = PARENT.schema + schema
      
!     portal_type = meta_type = "eduplone " +'FreeText' #+PARENT.meta_type
      ##archetype_name = PARENT.archetype_name[2:]+" (ep task)"
      archetype_name ="FreeText (ep task)"
--- 51,55 ----
      schema = PARENT.schema + schema
      
!     portal_type = meta_type = "eduplone " + 'FreeText' #+PARENT.meta_type
      ##archetype_name = PARENT.archetype_name[2:]+" (ep task)"
      archetype_name ="FreeText (ep task)"
***************
*** 58,64 ****
      content_icon = 'questionmark.gif'
      global_allow = 0    
!     filter_content_types = 0    
      
      
-             
  registerType(EduploneFreeText)
--- 58,70 ----
      content_icon = 'questionmark.gif'
      global_allow = 0    
!     filter_content_types = 1    
!     
!     
!     oldInvokeFactory=PARENT.invokeFactory
!     def invokeFactory(self, type_name, id, RESPONSE=None, *args, **kw):
! 	""" set a default title"""
! 	defTitle='Answer' + str(len(self.objectValues())+1) #let's not start counting at zero for user-view...
! 	return self.oldInvokeFactory(type_name, id, RESPONSE, title=defTitle, *args, **kw)
      
      
  registerType(EduploneFreeText)

Index: EduploneMatching.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneMatching.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EduploneMatching.py	29 Sep 2004 11:25:04 -0000	1.2
--- EduploneMatching.py	7 Oct 2004 16:50:40 -0000	1.3
***************
*** 71,74 ****
  	r.sort()
  	return r
!             
  registerType(EduploneMatching)
--- 71,80 ----
  	r.sort()
  	return r
! 
!     oldInvokeFactory=PARENT.invokeFactory
!     def invokeFactory(self, type_name, id, RESPONSE=None, *args, **kw):
! 	""" set a default title"""
! 	defTitle='Answer' + str(len(self.objectValues())+1) #let's not start counting at zero for user-view...
! 	return self.oldInvokeFactory(type_name, id, RESPONSE, title=defTitle, *args, **kw)
! 			                 
  registerType(EduploneMatching)

Index: EduploneSingleChoice.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneSingleChoice.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EduploneSingleChoice.py	29 Sep 2004 11:25:04 -0000	1.2
--- EduploneSingleChoice.py	7 Oct 2004 16:50:40 -0000	1.3
***************
*** 59,61 ****
--- 59,67 ----
      global_allow = 0
  
+     oldInvokeFactory=PARENT.invokeFactory
+     def invokeFactory(self, type_name, id, RESPONSE=None, *args, **kw):
+         """ set a default title"""
+ 	defTitle='Answer' + str(len(self.objectValues())+1) #let's not start counting at zero for user-view...
+ 	return self.oldInvokeFactory(type_name, id, RESPONSE, title=defTitle, *args, **kw)
+ 			     
  registerType(EduploneSingleChoice)

Index: EduploneFreeTextAnswer.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneFreeTextAnswer.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EduploneFreeTextAnswer.py	5 Oct 2004 18:19:08 -0000	1.3
--- EduploneFreeTextAnswer.py	7 Oct 2004 16:50:40 -0000	1.4
***************
*** 23,28 ****
  from Products.EduploneTest.EduploneAnswerSchema import *
  
! schema = Schema((CORRECT_ANSWER_FIELD['FreeText']),
!     			marshall=PrimaryFieldMarshaller(),
  		 )
  
--- 23,42 ----
  from Products.EduploneTest.EduploneAnswerSchema import *
  
! schema = Schema((
! 		 CORRECT_ANSWER_FIELD['FreeText'],
! 		 
! 		# TextField('Title',
! 		#	   required=1,
! 		#	   default='default value....',
! 		#	   ),
! 			   
! 		 
! 		 #TextField('Id',
! 		 #	   required=1,
! 		 #	   default='defaultId',
! 		 #	   ),
! 			   
! 		 ),
!     		 marshall=PrimaryFieldMarshaller(),
  		 )
  
***************
*** 32,39 ****
  
      schema = BaseContent.schema + schema
      portal_type = meta_type = "eduplone FreeTextAnswer"
      archetype_name = "Answer (ep FreeText)"
      #actions=actions
- 
      factory_type_information = {
          #'content_icon':'canvasqti_icon.gif',
--- 46,53 ----
  
      schema = BaseContent.schema + schema
+     schema = schema
      portal_type = meta_type = "eduplone FreeTextAnswer"
      archetype_name = "Answer (ep FreeText)"
      #actions=actions
      factory_type_information = {
          #'content_icon':'canvasqti_icon.gif',
***************
*** 42,45 ****
--- 56,63 ----
      }
  
+     #schema.get('title').default="gggggggggggggggg"
+ 	    
+ 	
+ 	
      """
      def getAnswer(self):

Index: EduploneTextTask.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneTest/types/EduploneTextTask.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EduploneTextTask.py	29 Sep 2004 11:25:04 -0000	1.2
--- EduploneTextTask.py	7 Oct 2004 16:50:40 -0000	1.3
***************
*** 61,67 ****
      global_allow = 0    
          
!     ## wth??
!     ##__call__():
! 	##""" """
! 	
  registerType(EduploneTextTask)
--- 61,71 ----
      global_allow = 0    
          
!     oldInvokeFactory=PARENT.invokeFactory
!     def invokeFactory(self, type_name, id, RESPONSE=None, *args, **kw):
! 	""" set a default title"""
! 	if len(self.objectValues())>0:
! 	    raise Exception('Not more than one answer in this type!')
! 	defTitle='Answer' + str(len(self.objectValues())+1) #let's not start counting at zero for user-view...
! 	return self.oldInvokeFactory(type_name, id, RESPONSE, title=defTitle, *args, **kw)
! 			     	
  registerType(EduploneTextTask)



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
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.