EduploneExam/answers BlindGapAnswer.py,1.2,1.3 BooleanAnswer.py,1.2,1.3 ChoiceGapAnswer.py,1.2,1.3 FreeTextAnswer.py,1.2,1.3 MatchingAnswer.py,1.2,1.3 MathAnswer.py,1.2,1.3 MultipleChoiceAnswer.py,1.2,1.3 SingleChoiceAnswer.py,1.2,1.3 TextTaskAnswer.py,1.2,1.3 TrueFalseAnswer.py,1.2,1.3 __init__.py,1.1,1.2
Nils Haagen <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam/answers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13095/answers Modified Files: BlindGapAnswer.py BooleanAnswer.py ChoiceGapAnswer.py FreeTextAnswer.py MatchingAnswer.py MathAnswer.py MultipleChoiceAnswer.py SingleChoiceAnswer.py TextTaskAnswer.py TrueFalseAnswer.py __init__.py Log Message: new atribs for sme answers Index: TrueFalseAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/TrueFalseAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TrueFalseAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- TrueFalseAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 43,52 **** allowed_content_types = [] + getattr(BooleanAnswer,'allowed_content_types',[]) - __implements__ = getattr(BaseContent,'__implements__',()) + getattr(BooleanAnswer,'__implements__',()) - ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + getattr(BooleanAnswer,'schema',Schema(())) + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 42,49 ---- allowed_content_types = [] + getattr(BooleanAnswer,'allowed_content_types',[]) ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + getattr(BooleanAnswer,'schema',Schema(())) + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', Index: MultipleChoiceAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/MultipleChoiceAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MultipleChoiceAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- MultipleChoiceAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 43,52 **** allowed_content_types = [] + getattr(BooleanAnswer,'allowed_content_types',[]) - __implements__ = getattr(BaseContent,'__implements__',()) + getattr(BooleanAnswer,'__implements__',()) - ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + getattr(BooleanAnswer,'schema',Schema(())) + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 42,49 ---- allowed_content_types = [] + getattr(BooleanAnswer,'allowed_content_types',[]) ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + getattr(BooleanAnswer,'schema',Schema(())) + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', Index: FreeTextAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/FreeTextAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FreeTextAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- FreeTextAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 51,55 **** ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 50,54 ---- ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', *************** *** 96,99 **** --- 95,99 ---- #methods from Interface IExamAnswer + security.declareProtected('''''','processValue') def processValue(self): ''' Index: ChoiceGapAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/ChoiceGapAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChoiceGapAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- ChoiceGapAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 42,51 **** allowed_content_types = [] - __implements__ = getattr(BaseContent,'__implements__',()) - ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 41,48 ---- allowed_content_types = [] ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', Index: __init__.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** __init__.py 14 Dec 2004 09:47:47 -0000 1.1 --- __init__.py 14 Dec 2004 14:34:16 -0000 1.2 *************** *** 14,15 **** --- 14,16 ---- import MathAnswer import BlindGapAnswer + import B Index: MathAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/MathAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MathAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- MathAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 48,52 **** ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 47,51 ---- ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', *************** *** 93,102 **** #methods from Interface IExamAnswer ! def processValue(self): ''' ''' ! ! pass --- 92,105 ---- #methods from Interface IExamAnswer ! security.declareProtected('''''','processValue') ! def processValue(self, value=None): ''' ''' ! range ! if value and float(value) and : ! return True ! else: ! return False Index: TextTaskAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/TextTaskAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TextTaskAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- TextTaskAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 48,52 **** ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 47,51 ---- ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', *************** *** 78,81 **** --- 77,89 ---- ), + BooleanField('caseSensitive', + widget=BooleanWidget(description='Enter a value for caseSensitive.', + description_msgid='EduploneExam_help_caseSensitive', + i18n_domain='EduploneExam', + label='Casesensitive', + label_msgid='EduploneExam_label_caseSensitive', + ), + ), + ), ) *************** *** 84,87 **** --- 92,96 ---- #methods from Interface IExamAnswer + security.declareProtected('''''','processValue') def processValue(self): ''' *************** *** 89,93 **** ''' ! pass --- 98,112 ---- ''' ! if self.caseSensitive: ! li=[] ! for i in self.correct: ! li.append(i.lower()) ! else: ! li=self.correct ! ! if value and value in li: ! return True ! else: ! return False Index: MatchingAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/MatchingAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MatchingAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- MatchingAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 48,52 **** ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 47,51 ---- ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', *************** *** 103,106 **** --- 102,106 ---- #methods from Interface IExamAnswer + security.declareProtected('''''','processValue') def processValue(self): ''' Index: BooleanAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/BooleanAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BooleanAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- BooleanAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 34,37 **** --- 33,38 ---- ##code-section module-header #fill in your manual code here + from types import StringTypes + ##/code-section module-header *************** *** 48,52 **** ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 49,53 ---- ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', *************** *** 103,112 **** #methods from Interface IExamAnswer ! def processValue(self): ''' ''' ! pass --- 104,121 ---- #methods from Interface IExamAnswer ! security.declareProtected('''''','processValue') ! def processValue(self, value=None): ''' ''' + if type(value) in StringTypes and value.lower() in ['0', 'false']: + value=False + + if value: + value=True + else: + value=False ! return self.correct==value Index: SingleChoiceAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/SingleChoiceAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SingleChoiceAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- SingleChoiceAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 46,55 **** allowed_content_types = [] + getattr(BooleanAnswer,'allowed_content_types',[]) - __implements__ = getattr(BaseContent,'__implements__',()) + getattr(BooleanAnswer,'__implements__',()) - ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + getattr(BooleanAnswer,'schema',Schema(())) + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 45,52 ---- allowed_content_types = [] + getattr(BooleanAnswer,'allowed_content_types',[]) ##code-section class-header #fill in your manual code here ##/code-section class-header ! schema=BaseSchema + getattr(BooleanAnswer,'schema',Schema(())) + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', Index: BlindGapAnswer.py =================================================================== RCS file: /cvsroot/eduplone/EduploneExam/answers/BlindGapAnswer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BlindGapAnswer.py 14 Dec 2004 13:09:57 -0000 1.2 --- BlindGapAnswer.py 14 Dec 2004 14:34:16 -0000 1.3 *************** *** 5,13 **** RCS-ID $Id$ """ ! # Copyright (c) 2004 by eduplone Open Source Business Network EEIG, contributed ! # by FH-Aargau, Switzerland # ! # Generated: Tue Dec 14 14:00:03 2004 ! # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) --- 5,12 ---- RCS-ID $Id$ """ ! # Copyright (c) 2004 by unknown # ! # Generated: Tue Dec 14 14:49:35 2004 ! # Generator: ArchGenXML Version 1.2 devel 1 http://sf.net/projects/archetypes/ # # GNU General Public Licence (GPL) *************** *** 25,29 **** # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'Nils Haagen, Jens Klein <[email protected]>, <[email protected]>' __docformat__ = 'plaintext' --- 24,28 ---- # Place, Suite 330, Boston, MA 02111-1307 USA # ! __author__ = 'unknown <unknown>' __docformat__ = 'plaintext' *************** *** 48,52 **** ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', --- 47,51 ---- ##/code-section class-header ! schema=BaseSchema + Schema(( StringField('id', widget=StringWidget(description='Enter a value for id.', *************** *** 78,81 **** --- 77,89 ---- ), + BooleanField('caseSensitive', + widget=BooleanWidget(description='Enter a value for caseSensitive.', + description_msgid='EduploneExam_help_caseSensitive', + i18n_domain='EduploneExam', + label='Casesensitive', + label_msgid='EduploneExam_label_caseSensitive', + ), + ), + ), ) *************** *** 84,93 **** #methods from Interface IExamAnswer ! def processValue(self): ''' ''' ! ! pass --- 92,111 ---- #methods from Interface IExamAnswer ! security.declareProtected('''''','processValue') ! def processValue(self, value=None): ''' ''' ! if self.caseSensitive: ! li=[] ! for i in self.correct: ! li.append(i.lower()) ! else: ! li=self.correct ! ! if value and value in li: ! return True ! else: ! return False ------------------------------------------------------- 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/