EduploneExam/answers BaseAnswer.py,NONE,1.1.2.1

Nils Haagen <[email protected]> Thu, 09 Feb 2006 21:32:38 +0000
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-serv26773/answers

Added Files:
      Tag: exam-1_1
	BaseAnswer.py 
Log Message:
as i said - introducing base answer :)

--- NEW FILE: BaseAnswer.py ---
# File: BaseAnswer.py
# 
# Copyright (c) 2006 by eduplone Open Source Business Network EEIG, contributed
# by FH-Aargau, Switzerland
# Generator: ArchGenXML Version 1.4.0-RC1 
#            http://plone.org/products/archgenxml
#
# GNU General Public Licence (GPL)
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#
__author__  = '''Nils Haagen <[email protected]>, Jens Klein <[email protected]>'''
__docformat__ = 'plaintext'


from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from Products.EduploneExam.interfaces.IExamAnswer import IExamAnswer


# additional imports from tagged value 'import'
from Products.EduploneExam.registry import registerAnswerType

from Products.EduploneExam.config import *
##code-section module-header #fill in your manual code here
##/code-section module-header

schema=Schema((
    StringField('title',
        widget=StringWidget(
            modes=("view",),
            label='Title',
            label_msgid='EduploneExam_label_title',
            description_msgid='EduploneExam_help_title',
            i18n_domain='EduploneExam',
        ),
        accessor="Title"
    ),

),
)


##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

BaseAnswer_schema = BaseSchema + \
    schema

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class BaseAnswer(BaseContent):
    security = ClassSecurityInfo()
    __implements__ = (getattr(BaseContent,'__implements__',()),) + (IExamAnswer,)


    # This name appears in the 'add' box
    archetype_name             = 'BaseAnswer'

    meta_type                  = 'BaseAnswer'
    portal_type                = 'BaseAnswer'
    allowed_content_types      = []
    filter_content_types       = 0
    global_allow               = 1
    allow_discussion           = 0
    #content_icon               = 'BaseAnswer.gif'
    immediate_view             = 'base_view'
    default_view               = 'base_view'
    suppl_views                = ()
    typeDescription            = "BaseAnswer"
    typeDescMsgId              = 'description_edit_baseanswer'

    schema = BaseAnswer_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header


    #Methods

    security.declarePublic('Title')
    def Title(self):
        """
        
        """
        
        return self.getId()


    #methods from Interface IExamAnswer

    security.declarePublic('processValue')
    def processValue(self,value):
        """
        
        """
        
        pass



registerType(BaseAnswer,PROJECTNAME)
# end of class BaseAnswer

##code-section module-footer #fill in your manual code here
##/code-section module-footer






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642