EduploneExam/questions BaseExamQuestion.py,1.30,1.30.2.1 FillGapQuestion.py,1.28,1.28.2.1 FreeTextQuestion.py,1.26,1.26.2.1 MatchingQuestion.py,1.26,1.26.2.1 MathQuestion.py,1.25,1.25.2.1 MultipleChoiceQuestion.py,1.26,1.26.2.1 SingleChoiceQuestion.py,1.26,1.26.2.1 TextTaskQuestion.py,1.25,1.25.2.1 TrueFalseQuestion.py,1.26,1.26.2.1 __init__.py,1.2,1.2.2.1

Nils Haagen <[email protected]> Sun, 02 Oct 2005 21:21:14 +0000
Newsgroups gmane.comp.web.zope.eduplone.cvs
Message-ID <[email protected]>
Update of /cvsroot/eduplone/EduploneExam/questions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3645/questions

Modified Files:
      Tag: exam-1_1
	BaseExamQuestion.py FillGapQuestion.py FreeTextQuestion.py 
	MatchingQuestion.py MathQuestion.py MultipleChoiceQuestion.py 
	SingleChoiceQuestion.py TextTaskQuestion.py 
	TrueFalseQuestion.py __init__.py 
Log Message:
exam-1_1 init. moving to the next version...

Index: FreeTextQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/FreeTextQuestion.py,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C2 -d -r1.26 -r1.26.2.1
*** FreeTextQuestion.py	9 Jun 2005 09:21:52 -0000	1.26
--- FreeTextQuestion.py	2 Oct 2005 21:21:12 -0000	1.26.2.1
***************
*** 1,11 ****
  # File: FreeTextQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: FreeTextQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,83 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
      TextField('exemplar',
          widget=TextAreaWidget(
              label='Exemplar',
              label_msgid='EduploneExam_label_exemplar',
-             description='Enter a value for exemplar.',
              description_msgid='EduploneExam_help_exemplar',
              i18n_domain='EduploneExam',
!         ),
      ),
!     
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class FreeTextQuestion(BaseFolder,BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'FreeTextQuestion'
-     portal_type = meta_type    = 'FreeTextQuestion' 
  
!     allowed_content_types      = ['FreeTextAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "FreeTextQuestion"
      typeDescMsgId              = 'description_edit_freetextquestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,85 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
      TextField('exemplar',
          widget=TextAreaWidget(
              label='Exemplar',
              label_msgid='EduploneExam_label_exemplar',
              description_msgid='EduploneExam_help_exemplar',
              i18n_domain='EduploneExam',
!         )
      ),
! 
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ FreeTextQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class FreeTextQuestion(BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'FreeTextQuestion'
  
!     meta_type                  = 'FreeTextQuestion'
!     portal_type                = 'FreeTextQuestion'
!     allowed_content_types      = ['FreeTextAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "FreeTextQuestion"
      typeDescMsgId              = 'description_edit_freetextquestion'
  
!     schema = FreeTextQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 127,130 ****
--- 129,133 ----
  
  
+ 
  registerType(FreeTextQuestion,PROJECTNAME)
  # end of class FreeTextQuestion

Index: FillGapQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/FillGapQuestion.py,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -C2 -d -r1.28 -r1.28.2.1
*** FillGapQuestion.py	19 Sep 2005 06:42:52 -0000	1.28
--- FillGapQuestion.py	2 Oct 2005 21:21:12 -0000	1.28.2.1
***************
*** 1,11 ****
  # File: FillGapQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: FillGapQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,83 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
      TextField('basetext',
          widget=TextAreaWidget(
              label='Basetext',
              label_msgid='EduploneExam_label_basetext',
-             description='Enter a value for basetext.',
              description_msgid='EduploneExam_help_basetext',
              i18n_domain='EduploneExam',
!         ),
      ),
!     
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class FillGapQuestion(BaseFolder,BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'FillGapQuestion'
-     portal_type = meta_type    = 'FillGapQuestion' 
  
!     allowed_content_types      = ['ChoiceGapAnswer', 'BlindGapAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "FillGapQuestion"
      typeDescMsgId              = 'description_edit_fillgapquestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,85 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
      TextField('basetext',
          widget=TextAreaWidget(
              label='Basetext',
              label_msgid='EduploneExam_label_basetext',
              description_msgid='EduploneExam_help_basetext',
              i18n_domain='EduploneExam',
!         )
      ),
! 
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ FillGapQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class FillGapQuestion(BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'FillGapQuestion'
  
!     meta_type                  = 'FillGapQuestion'
!     portal_type                = 'FillGapQuestion'
!     allowed_content_types      = ['ChoiceGapAnswer', 'BlindGapAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "FillGapQuestion"
      typeDescMsgId              = 'description_edit_fillgapquestion'
  
!     schema = FillGapQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 88,100 ****
      #manually created methods
  
-     def getGapPosition(self, gapId):
-         """
-         """
-         counter = 0
-         for word in self.getBasetext().split(" "):
-             if word=="<id='%s'>" % gapId:
-                 return counter
-             counter += 1            
- 
      def isGap(self, gapId):
          """ Returns True if given ID <gapId> is a valid gap. """
--- 90,93 ----
***************
*** 102,113 ****
          return self.isWordGap(basetext[gapId])
  
!     def isWordGap(self, word):
!         """ """
!         return word.startswith("<id='") and word.endswith("'>")
!     
      def getWordById(self, gapId):
          """ Returns word by given ID <gapId>. """
          return self.getBasetextAsList()[gapId]
  
      def processResponse(self, REQUEST):
          ''' 
--- 95,104 ----
          return self.isWordGap(basetext[gapId])
  
! 
      def getWordById(self, gapId):
          """ Returns word by given ID <gapId>. """
          return self.getBasetextAsList()[gapId]
  
+ 
      def processResponse(self, REQUEST):
          ''' 
***************
*** 152,155 ****
--- 143,157 ----
          responseObj.setScore(score)
  
+ 
+     def getGapPosition(self, gapId):
+         """
+         """
+         counter = 0
+         for word in self.getBasetext().split(" "):
+             if word=="<id='%s'>" % gapId:
+                 return counter
+             counter += 1            
+ 
+ 
      def getBasetextAsList(self):
          """ Returns FillGap's base text as splitted list, each item
***************
*** 159,162 ****
--- 161,170 ----
  
  
+     def isWordGap(self, word):
+         """ """
+         return word.startswith("<id='") and word.endswith("'>")
+     
+ 
+ 
  registerType(FillGapQuestion,PROJECTNAME)
  # end of class FillGapQuestion

Index: TrueFalseQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/TrueFalseQuestion.py,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C2 -d -r1.26 -r1.26.2.1
*** TrueFalseQuestion.py	9 Jun 2005 09:21:52 -0000	1.26
--- TrueFalseQuestion.py	2 Oct 2005 21:21:12 -0000	1.26.2.1
***************
*** 1,11 ****
  # File: TrueFalseQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: TrueFalseQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,73 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class TrueFalseQuestion(BaseFolder,BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'TrueFalseQuestion'
-     portal_type = meta_type    = 'TrueFalseQuestion' 
  
!     allowed_content_types      = ['TrueFalseAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "TrueFalseQuestion"
      typeDescMsgId              = 'description_edit_truefalsequestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,76 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ TrueFalseQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class TrueFalseQuestion(BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'TrueFalseQuestion'
  
!     meta_type                  = 'TrueFalseQuestion'
!     portal_type                = 'TrueFalseQuestion'
!     allowed_content_types      = ['TrueFalseAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "TrueFalseQuestion"
      typeDescMsgId              = 'description_edit_truefalsequestion'
  
!     schema = TrueFalseQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 115,118 ****
--- 118,122 ----
  
  
+ 
  registerType(TrueFalseQuestion,PROJECTNAME)
  # end of class TrueFalseQuestion

Index: TextTaskQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/TextTaskQuestion.py,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -C2 -d -r1.25 -r1.25.2.1
*** TextTaskQuestion.py	8 Apr 2005 09:18:14 -0000	1.25
--- TextTaskQuestion.py	2 Oct 2005 21:21:12 -0000	1.25.2.1
***************
*** 1,11 ****
  # File: TextTaskQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: TextTaskQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,73 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class TextTaskQuestion(BaseFolder,BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'TextTaskQuestion'
-     portal_type = meta_type    = 'TextTaskQuestion' 
  
!     allowed_content_types      = ['TextTaskAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "TextTaskQuestion"
      typeDescMsgId              = 'description_edit_texttaskquestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,76 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ TextTaskQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class TextTaskQuestion(BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'TextTaskQuestion'
  
!     meta_type                  = 'TextTaskQuestion'
!     portal_type                = 'TextTaskQuestion'
!     allowed_content_types      = ['TextTaskAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "TextTaskQuestion"
      typeDescMsgId              = 'description_edit_texttaskquestion'
  
!     schema = TextTaskQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 106,109 ****
--- 109,113 ----
  
  
+ 
  registerType(TextTaskQuestion,PROJECTNAME)
  # end of class TextTaskQuestion

Index: MultipleChoiceQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/MultipleChoiceQuestion.py,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C2 -d -r1.26 -r1.26.2.1
*** MultipleChoiceQuestion.py	9 Jun 2005 09:21:52 -0000	1.26
--- MultipleChoiceQuestion.py	2 Oct 2005 21:21:12 -0000	1.26.2.1
***************
*** 1,11 ****
  # File: MultipleChoiceQuestion.py
! """\
! get values from request and returns an evaluated response
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: MultipleChoiceQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,76 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class MultipleChoiceQuestion(BaseFolder,BaseExamQuestion):
      """
      get values from request and returns an evaluated response
      """
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'MultipleChoiceQuestion'
-     portal_type = meta_type    = 'MultipleChoiceQuestion' 
  
!     allowed_content_types      = ['MultipleChoiceAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "MultipleChoiceQuestion"
      typeDescMsgId              = 'description_edit_multiplechoicequestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,79 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ MultipleChoiceQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class MultipleChoiceQuestion(BaseExamQuestion):
      """
      get values from request and returns an evaluated response
      """
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'MultipleChoiceQuestion'
  
!     meta_type                  = 'MultipleChoiceQuestion'
!     portal_type                = 'MultipleChoiceQuestion'
!     allowed_content_types      = ['MultipleChoiceAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "MultipleChoiceQuestion"
      typeDescMsgId              = 'description_edit_multiplechoicequestion'
  
!     schema = MultipleChoiceQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 118,121 ****
--- 121,125 ----
  
  
+ 
  registerType(MultipleChoiceQuestion,PROJECTNAME)
  # end of class MultipleChoiceQuestion

Index: __init__.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/__init__.py,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** __init__.py	8 Apr 2005 09:18:14 -0000	1.2
--- __init__.py	2 Oct 2005 21:21:12 -0000	1.2.2.1
***************
*** 4,8 ****
  ##code-section init-module-header #fill in your manual code here
  ##/code-section init-module-header
!  
  
  #subpackages
--- 4,8 ----
  ##code-section init-module-header #fill in your manual code here
  ##/code-section init-module-header
! 
  
  #subpackages
***************
*** 21,22 ****
--- 21,23 ----
  ##code-section init-module-footer #fill in your manual code here
  ##/code-section init-module-footer
+ 

Index: MathQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/MathQuestion.py,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -C2 -d -r1.25 -r1.25.2.1
*** MathQuestion.py	8 Apr 2005 09:18:14 -0000	1.25
--- MathQuestion.py	2 Oct 2005 21:21:12 -0000	1.25.2.1
***************
*** 1,11 ****
  # File: MathQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: MathQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,73 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class MathQuestion(BaseFolder,BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'MathQuestion'
-     portal_type = meta_type    = 'MathQuestion' 
  
!     allowed_content_types      = ['MathAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "MathQuestion"
      typeDescMsgId              = 'description_edit_mathquestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,76 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ MathQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class MathQuestion(BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'MathQuestion'
  
!     meta_type                  = 'MathQuestion'
!     portal_type                = 'MathQuestion'
!     allowed_content_types      = ['MathAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "MathQuestion"
      typeDescMsgId              = 'description_edit_mathquestion'
  
!     schema = MathQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 108,111 ****
--- 111,115 ----
  
  
+ 
  registerType(MathQuestion,PROJECTNAME)
  # end of class MathQuestion

Index: MatchingQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/MatchingQuestion.py,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C2 -d -r1.26 -r1.26.2.1
*** MatchingQuestion.py	9 Jun 2005 09:21:52 -0000	1.26
--- MatchingQuestion.py	2 Oct 2005 21:21:12 -0000	1.26.2.1
***************
*** 1,11 ****
  # File: MatchingQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: MatchingQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,73 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class MatchingQuestion(BaseFolder,BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'MatchingQuestion'
-     portal_type = meta_type    = 'MatchingQuestion' 
  
!     allowed_content_types      = ['MatchingAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "MatchingQuestion"
      typeDescMsgId              = 'description_edit_matchingquestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,76 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ MatchingQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class MatchingQuestion(BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'MatchingQuestion'
  
!     meta_type                  = 'MatchingQuestion'
!     portal_type                = 'MatchingQuestion'
!     allowed_content_types      = ['MatchingAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "MatchingQuestion"
      typeDescMsgId              = 'description_edit_matchingquestion'
  
!     schema = MatchingQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 91,94 ****
--- 94,98 ----
          return r
  
+ 
      #manually created methods
  
***************
*** 130,133 ****
--- 134,138 ----
  
  
+ 
  registerType(MatchingQuestion,PROJECTNAME)
  # end of class MatchingQuestion

Index: SingleChoiceQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/SingleChoiceQuestion.py,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C2 -d -r1.26 -r1.26.2.1
*** SingleChoiceQuestion.py	9 Jun 2005 09:21:52 -0000	1.26
--- SingleChoiceQuestion.py	2 Oct 2005 21:21:12 -0000	1.26.2.1
***************
*** 1,11 ****
  # File: SingleChoiceQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: SingleChoiceQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from BaseExamQuestion import BaseExamQuestion
  
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from BaseExamQuestion import BaseExamQuestion
  
***************
*** 37,73 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema= Schema((
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class SingleChoiceQuestion(BaseFolder,BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseFolder,'__implements__',()),) + (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'SingleChoiceQuestion'
-     portal_type = meta_type    = 'SingleChoiceQuestion' 
  
!     allowed_content_types      = ['SingleChoiceAnswer'] + getattr(BaseExamQuestion,'allowed_content_types',[])
      filter_content_types       = 1
!     global_allow               = 0
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
      typeDescription            = "SingleChoiceQuestion"
      typeDescMsgId              = 'description_edit_singlechoicequestion'
  
!     schema = BaseFolderSchema + \
!              getattr(BaseExamQuestion,'schema',Schema(())) + \
!              schema
  
      ##code-section class-header #fill in your manual code here
--- 33,76 ----
  
  from Products.EduploneExam.config import *
  ##code-section module-header #fill in your manual code here
  ##/code-section module-header
  
! schema=Schema((
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ SingleChoiceQuestion_schema = BaseFolderSchema + \
+     getattr(BaseExamQuestion,'schema',Schema(())) + \
+     schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
  
! class SingleChoiceQuestion(BaseExamQuestion):
      security = ClassSecurityInfo()
!     __implements__ = (getattr(BaseExamQuestion,'__implements__',()),)
  
  
      # This name appears in the 'add' box
      archetype_name             = 'SingleChoiceQuestion'
  
!     meta_type                  = 'SingleChoiceQuestion'
!     portal_type                = 'SingleChoiceQuestion'
!     allowed_content_types      = ['SingleChoiceAnswer'] + list(getattr(BaseExamQuestion, 'allowed_content_types', []))
      filter_content_types       = 1
!     global_allow               = 1
      allow_discussion           = 0
      content_icon               = 'ExamQuestion.gif'
      immediate_view             = 'base_view'
      default_view               = 'base_view'
+     suppl_views                = ()
      typeDescription            = "SingleChoiceQuestion"
      typeDescMsgId              = 'description_edit_singlechoicequestion'
  
!     schema = SingleChoiceQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 115,118 ****
--- 118,122 ----
  
  
+ 
  registerType(SingleChoiceQuestion,PROJECTNAME)
  # end of class SingleChoiceQuestion

Index: BaseExamQuestion.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/questions/BaseExamQuestion.py,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -C2 -d -r1.30 -r1.30.2.1
*** BaseExamQuestion.py	9 Jun 2005 09:21:52 -0000	1.30
--- BaseExamQuestion.py	2 Oct 2005 21:21:12 -0000	1.30.2.1
***************
*** 1,11 ****
  # File: BaseExamQuestion.py
! """\
! unknown
! 
! """
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! #
! # Generator: ArchGenXML Version 1.4 devel 1 http://sf.net/projects/archetypes/
  #
  # GNU General Public Licence (GPL)
--- 1,8 ----
  # File: BaseExamQuestion.py
! # 
  # Copyright (c) 2005 by eduplone Open Source Business Network EEIG, contributed
  # by FH-Aargau, Switzerland
! # Generator: ArchGenXML Version 1.4.0-beta2 devel 
! #            http://plone.org/products/archgenxml
  #
  # GNU General Public Licence (GPL)
***************
*** 26,33 ****
  __docformat__ = 'plaintext'
  
- from AccessControl import ClassSecurityInfo
- from Products.Archetypes.public import *
- 
  
  from Products.EduploneExam.interfaces.IExamNotifier import IExamNotifier
  from Products.EduploneExam.interfaces.IExamQuestion import IExamQuestion
--- 23,29 ----
  __docformat__ = 'plaintext'
  
  
+ from AccessControl import ClassSecurityInfo
+ from Products.Archetypes.atapi import *
  from Products.EduploneExam.interfaces.IExamNotifier import IExamNotifier
  from Products.EduploneExam.interfaces.IExamQuestion import IExamQuestion
***************
*** 38,42 ****
  
  from Products.EduploneExam.config import *
- 
  ##code-section module-header #fill in your manual code here
  from Products.CMFCore.utils import getToolByName
--- 34,37 ----
***************
*** 44,102 ****
  ##/code-section module-header
  
! schema= Schema((
      TextField('question',
          widget=TextAreaWidget(
              label='Question',
              label_msgid='EduploneExam_label_question',
-             description='Enter a value for question.',
              description_msgid='EduploneExam_help_question',
              i18n_domain='EduploneExam',
!         ),
      ),
!     
      TextField('instruction',
          widget=TextAreaWidget(
              label='Instruction',
              label_msgid='EduploneExam_label_instruction',
-             description='Enter a value for instruction.',
              description_msgid='EduploneExam_help_instruction',
              i18n_domain='EduploneExam',
!         ),
      ),
!     
      IntegerField('maxScore',
          widget=IntegerWidget(
              label='Maxscore',
              label_msgid='EduploneExam_label_maxScore',
-             description='Enter a value for maxScore.',
              description_msgid='EduploneExam_help_maxScore',
              i18n_domain='EduploneExam',
!         ),
      ),
!     
      BooleanField('strict',
          widget=BooleanWidget(
              label='Strict',
              label_msgid='EduploneExam_label_strict',
-             description='Enter a value for strict.',
              description_msgid='EduploneExam_help_strict',
              i18n_domain='EduploneExam',
!         ),
      ),
!     
      ImageField('picture',
          widget=ImageWidget(
              label='Picture',
              label_msgid='EduploneExam_label_picture',
-             description='Enter a value for picture.',
              description_msgid='EduploneExam_help_picture',
              i18n_domain='EduploneExam',
          ),
!         storage=AttributeStorage(),
      ),
!     
  ),
  )
  
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
--- 39,99 ----
  ##/code-section module-header
  
! schema=Schema((
      TextField('question',
          widget=TextAreaWidget(
              label='Question',
              label_msgid='EduploneExam_label_question',
              description_msgid='EduploneExam_help_question',
              i18n_domain='EduploneExam',
!         )
      ),
! 
      TextField('instruction',
          widget=TextAreaWidget(
              label='Instruction',
              label_msgid='EduploneExam_label_instruction',
              description_msgid='EduploneExam_help_instruction',
              i18n_domain='EduploneExam',
!         )
      ),
! 
      IntegerField('maxScore',
+         default="0",
          widget=IntegerWidget(
              label='Maxscore',
              label_msgid='EduploneExam_label_maxScore',
              description_msgid='EduploneExam_help_maxScore',
              i18n_domain='EduploneExam',
!         )
      ),
! 
      BooleanField('strict',
          widget=BooleanWidget(
              label='Strict',
              label_msgid='EduploneExam_label_strict',
              description_msgid='EduploneExam_help_strict',
              i18n_domain='EduploneExam',
!         )
      ),
! 
      ImageField('picture',
          widget=ImageWidget(
              label='Picture',
              label_msgid='EduploneExam_label_picture',
              description_msgid='EduploneExam_help_picture',
              i18n_domain='EduploneExam',
          ),
!         storage=AttributeStorage()
      ),
! 
  ),
  )
  
+ 
+ ##code-section after-local-schema #fill in your manual code here
+ ##/code-section after-local-schema
+ 
+ BaseExamQuestion_schema = schema
+ 
  ##code-section after-schema #fill in your manual code here
  ##/code-section after-schema
***************
*** 104,113 ****
  class BaseExamQuestion(OrderedBaseFolder):
      security = ClassSecurityInfo()
-     #__implements__ = () + (IExamNotifier,IExamQuestion,)
      __implements__ = (getattr(OrderedBaseFolder,'__implements__',()),) + (IExamNotifier,IExamQuestion,)
  
  
!     allowed_content_types      = [] 
!     schema = schema
  
      ##code-section class-header #fill in your manual code here
--- 101,109 ----
  class BaseExamQuestion(OrderedBaseFolder):
      security = ClassSecurityInfo()
      __implements__ = (getattr(OrderedBaseFolder,'__implements__',()),) + (IExamNotifier,IExamQuestion,)
  
  
!     allowed_content_types      = []
!     schema = BaseExamQuestion_schema
  
      ##code-section class-header #fill in your manual code here
***************
*** 127,130 ****
--- 123,127 ----
  
  
+ 
      security.declarePublic('registerNotifierAfterProcess')
      def registerNotifierAfterProcess(self,object):
***************
*** 136,139 ****
--- 133,137 ----
  
  
+ 
      security.declarePublic('notifyOnView')
      def notifyOnView(self):
***************
*** 145,148 ****
--- 143,147 ----
  
  
+ 
      security.declarePublic('notifyAfterProcess')
      def notifyAfterProcess(self):
***************
*** 153,156 ****
--- 152,156 ----
          pass
  
+ 
      #methods from Interface IExamQuestion
  
***************
*** 166,169 ****
--- 166,170 ----
  
  
+ 
      security.declarePublic('getQuestionType')
      def getQuestionType(self):
***************
*** 172,175 ****
--- 173,177 ----
          return self.archetype_name
  
+ 
      #manually created methods
  
***************
*** 184,187 ****
--- 186,190 ----
              return None
  
+ 
  # end of class BaseExamQuestion
  



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl