Webquest Webquest.py,1.2,1.3 WebquestDoc.py,1.2,1.3 WebquestFolder.py,1.2,1.3
Jean-Paul Ladage <[email protected]>
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/Webquest
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19555
Modified Files:
Webquest.py WebquestDoc.py WebquestFolder.py
Log Message:
Removed stupid windows ^M eols
Index: WebquestFolder.py
===================================================================
RCS file: /cvsroot/eduplone/Webquest/WebquestFolder.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** WebquestFolder.py 3 Jun 2004 00:08:32 -0000 1.2
--- WebquestFolder.py 29 Nov 2004 14:10:08 -0000 1.3
***************
*** 1,62 ****
! #
! # Created by A. Hadi and J. Ladage of Zopeworks NL
! #
!
!
! from Products.Archetypes.public import *
! # Workaround for the 1.2.3 OrderedBaseFolder class to work with Plone
! #from Products.Webquest.OrderedBaseFolder import OrderedBaseFolder
from AccessControl import ClassSecurityInfo
! from Products.CMFCore import CMFCorePermissions
!
!
! schema = BaseFolderSchema + Schema((
! TextField('text',
! searchable=1,
! default_output_type='text/html',
! default_content_type='text/structured',
! allowable_content_types = ('text/html', 'text/structured', 'text/plain'),
! widget=VisualWidget(description_msgid="desc_folder",
! description="Here you can add text for the resources to accomplish the quest.",
! label_msgid="label_body_text",
! label="Body text",
! i18n_domain = "plone",
! rows=6)),
! ))
!
!
! class WebquestFolder(BaseFolder):
! """A simple folderish archetype"""
! schema = schema
! archetype_name = 'WebquestFolder'
! meta_type = 'Webquest Folder'
! allowed_content_types = ('WebquestLink','WebquestImage', 'WebquestFile')
! global_allow = 0
!
! actions = ({
! 'id': 'view',
! 'name': 'View',
! 'action': 'string:${folder_url}/webquestfolder_view',
! 'permissions': (CMFCorePermissions.View,)
! },)
!
! security = ClassSecurityInfo()
!
! security.declarePublic('CookedBody')
! def CookedBody(self):
! """Dummy attribute to allow drop-in replacement of Document"""
! return self.getText()
!
! def setText(self, value, **kwargs):
! """set text_format for backward compatibility with std cmf types"""
! field = self.getField('text')
! field.set(self, value, **kwargs)
! bu = self.getRawText(maybe_baseunit=1)
! if hasattr(bu, 'mimetype'):
! self.text_format = str(bu.mimetype)
!
! registerType(WebquestFolder)
!
! def modify_fti(fti):
! fti['global_allow'] = 0
! return fti
--- 1,62 ----
! #
! # Created by A. Hadi and J. Ladage of Zopeworks NL
! #
!
!
! from Products.Archetypes.public import *
! # Workaround for the 1.2.3 OrderedBaseFolder class to work with Plone
! #from Products.Webquest.OrderedBaseFolder import OrderedBaseFolder
from AccessControl import ClassSecurityInfo
! from Products.CMFCore import CMFCorePermissions
!
!
! schema = BaseFolderSchema + Schema((
! TextField('text',
! searchable=1,
! default_output_type='text/html',
! default_content_type='text/structured',
! allowable_content_types = ('text/html', 'text/structured', 'text/plain'),
! widget=VisualWidget(description_msgid="desc_folder",
! description="Here you can add text for the resources to accomplish the quest.",
! label_msgid="label_body_text",
! label="Body text",
! i18n_domain = "plone",
! rows=6)),
! ))
!
!
! class WebquestFolder(BaseFolder):
! """A simple folderish archetype"""
! schema = schema
! archetype_name = 'WebquestFolder'
! meta_type = 'Webquest Folder'
! allowed_content_types = ('WebquestLink','WebquestImage', 'WebquestFile')
! global_allow = 0
!
! actions = ({
! 'id': 'view',
! 'name': 'View',
! 'action': 'string:${folder_url}/webquestfolder_view',
! 'permissions': (CMFCorePermissions.View,)
! },)
!
! security = ClassSecurityInfo()
!
! security.declarePublic('CookedBody')
! def CookedBody(self):
! """Dummy attribute to allow drop-in replacement of Document"""
! return self.getText()
!
! def setText(self, value, **kwargs):
! """set text_format for backward compatibility with std cmf types"""
! field = self.getField('text')
! field.set(self, value, **kwargs)
! bu = self.getRawText(maybe_baseunit=1)
! if hasattr(bu, 'mimetype'):
! self.text_format = str(bu.mimetype)
!
! registerType(WebquestFolder)
!
! def modify_fti(fti):
! fti['global_allow'] = 0
! return fti
Index: Webquest.py
===================================================================
RCS file: /cvsroot/eduplone/Webquest/Webquest.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Webquest.py 3 Jun 2004 00:08:31 -0000 1.2
--- Webquest.py 29 Nov 2004 14:10:08 -0000 1.3
***************
*** 1,148 ****
! #
! # Created by A. Hadi and J. Ladage of Zopeworks NL
! #
!
!
! from Products.Archetypes.public import *
! # Workaround for the 1.2.3 OrderedBaseFolder class to work with Plone
! #from Products.Webquest.OrderedBaseFolder import OrderedBaseFolder
from AccessControl import ClassSecurityInfo
! from Products.CMFCore import CMFCorePermissions
! import string
!
!
! schema = BaseFolderSchema + Schema((
! TextField('text',
! required=1,
! searchable=1,
! default_output_type='text/html',
! default_content_type='text/plain',
! allowable_content_types = ('text/html', 'text/structured', 'text/plain'),
! widget=VisualWidget(description_msgid="desc_webquest",
! description="Here you can fill in the homepage of the webquest.",
! label_msgid="label_webquest",
! label="Body text of the home page",
! i18n_domain = "plone",
! rows=6)),
!
!
! ))
!
!
! class Webquest(BaseFolder):
! """A simple folderish archetype"""
! schema = schema
! archetype_name = 'Webquest'
! meta_type = 'Webquest'
! content_icon = 'wq_icon.gif'
! allowed_content_types = ('WebquestDoc', 'WebquestFolder', 'Image')
!
! langmap = {\
! 'en': {\
! '10':'Introduction',
! '20':'Task',
! '30':'Process',
! '40':"Resources",
! '50':"Evaluation",
! '60':"Conclusion",
! },
! 'nl': {\
! '10':'Introductie',
! '20':'Taak',
! '30':'Proces',
! '40':"Bronnen",
! '50':"Evaluatie",
! '60':"Conclusie",
! },
! 'de': {\
! '10':'Einführung',
! '20':'Aufgabe',
! '30':'Ablauf',
! '40':"Quellen",
! '50':"Evaluierung",
! '60':"Schlussfolgerung",
! },
! 'fr': {\
! '10':'Introduction',
! '20':'Tache',
! '30':'Proces',
! '40':"Bronnen",
! '50':"Evaluation",
! '60':"Conclusion",
! },
! 'es': {\
! '10':'Introducción',
! '20':'Tareas',
! '30':'Procesos',
! '40':"Recursos",
! '50':"Evaluación",
! '60':"Conclusión",
! },
! 'ca': {\
! '10':'Introducció',
! '20':'Feines',
! '30':'Processos',
! '40':"Recursos",
! '50':"Avaluació",
! '60':"Conclusió",
! },
! }
!
!
! def manage_afterAdd(self, item, container):
! #OrderedBasefolder.manage_afterAdd(self, container)
! if self.REQUEST['HTTP_ACCEPT_LANGUAGE'][0:2] in self.langmap.keys():
! lang=self.REQUEST['HTTP_ACCEPT_LANGUAGE'][0:2]
! else:
! lang='en'
!
! if not '10' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='10')
! self['10'].title = self.langmap[lang]['10']
! if not '20' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='20')
! self['20'].title = self.langmap[lang]['20']
! if not '30' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='30')
! self['30'].title = self.langmap[lang]['30']
! if not '40' in self.objectIds():
! self.invokeFactory(type_name='WebquestFolder',
! id='40')
! self['40'].title = self.langmap[lang]['40']
! if not '50' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='50')
! self['50'].title = self.langmap[lang]['50']
! if not '60' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='60')
! self['60'].title = self.langmap[lang]['60']
!
!
! actions = ({
! 'id': 'view',
! 'name': 'View',
! 'action': 'string:${folder_url}/webquest_view',
! 'permissions': (CMFCorePermissions.View,)
! },)
!
! security = ClassSecurityInfo()
!
! security.declarePublic('CookedBody')
! def CookedBody(self):
! """Dummy attribute to allow drop-in replacement of Document"""
! return self.getText()
!
! def setText(self, value, **kwargs):
! """set text_format for backward compatibility with std cmf types"""
! field = self.getField('text')
! field.set(self, value, **kwargs)
! bu = self.getRawText(maybe_baseunit=1)
! if hasattr(bu, 'mimetype'):
! self.text_format = str(bu.mimetype)
!
!
! registerType(Webquest)
--- 1,148 ----
! #
! # Created by A. Hadi and J. Ladage of Zopeworks NL
! #
!
!
! from Products.Archetypes.public import *
! # Workaround for the 1.2.3 OrderedBaseFolder class to work with Plone
! #from Products.Webquest.OrderedBaseFolder import OrderedBaseFolder
from AccessControl import ClassSecurityInfo
! from Products.CMFCore import CMFCorePermissions
! import string
!
!
! schema = BaseFolderSchema + Schema((
! TextField('text',
! required=1,
! searchable=1,
! default_output_type='text/html',
! default_content_type='text/plain',
! allowable_content_types = ('text/html', 'text/structured', 'text/plain'),
! widget=VisualWidget(description_msgid="desc_webquest",
! description="Here you can fill in the homepage of the webquest.",
! label_msgid="label_webquest",
! label="Body text of the home page",
! i18n_domain = "plone",
! rows=6)),
!
!
! ))
!
!
! class Webquest(BaseFolder):
! """A simple folderish archetype"""
! schema = schema
! archetype_name = 'Webquest'
! meta_type = 'Webquest'
! content_icon = 'wq_icon.gif'
! allowed_content_types = ('WebquestDoc', 'WebquestFolder', 'Image')
!
! langmap = {\
! 'en': {\
! '10':'Introduction',
! '20':'Task',
! '30':'Process',
! '40':"Resources",
! '50':"Evaluation",
! '60':"Conclusion",
! },
! 'nl': {\
! '10':'Introductie',
! '20':'Taak',
! '30':'Proces',
! '40':"Bronnen",
! '50':"Evaluatie",
! '60':"Conclusie",
! },
! 'de': {\
! '10':'Einführung',
! '20':'Aufgabe',
! '30':'Ablauf',
! '40':"Quellen",
! '50':"Evaluierung",
! '60':"Schlussfolgerung",
! },
! 'fr': {\
! '10':'Introduction',
! '20':'Tache',
! '30':'Proces',
! '40':"Bronnen",
! '50':"Evaluation",
! '60':"Conclusion",
! },
! 'es': {\
! '10':'Introducción',
! '20':'Tareas',
! '30':'Procesos',
! '40':"Recursos",
! '50':"Evaluación",
! '60':"Conclusión",
! },
! 'ca': {\
! '10':'Introducció',
! '20':'Feines',
! '30':'Processos',
! '40':"Recursos",
! '50':"Avaluació",
! '60':"Conclusió",
! },
! }
!
!
! def manage_afterAdd(self, item, container):
! #OrderedBasefolder.manage_afterAdd(self, container)
! if self.REQUEST['HTTP_ACCEPT_LANGUAGE'][0:2] in self.langmap.keys():
! lang=self.REQUEST['HTTP_ACCEPT_LANGUAGE'][0:2]
! else:
! lang='en'
!
! if not '10' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='10')
! self['10'].title = self.langmap[lang]['10']
! if not '20' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='20')
! self['20'].title = self.langmap[lang]['20']
! if not '30' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='30')
! self['30'].title = self.langmap[lang]['30']
! if not '40' in self.objectIds():
! self.invokeFactory(type_name='WebquestFolder',
! id='40')
! self['40'].title = self.langmap[lang]['40']
! if not '50' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='50')
! self['50'].title = self.langmap[lang]['50']
! if not '60' in self.objectIds():
! self.invokeFactory(type_name='WebquestDoc',
! id='60')
! self['60'].title = self.langmap[lang]['60']
!
!
! actions = ({
! 'id': 'view',
! 'name': 'View',
! 'action': 'string:${folder_url}/webquest_view',
! 'permissions': (CMFCorePermissions.View,)
! },)
!
! security = ClassSecurityInfo()
!
! security.declarePublic('CookedBody')
! def CookedBody(self):
! """Dummy attribute to allow drop-in replacement of Document"""
! return self.getText()
!
! def setText(self, value, **kwargs):
! """set text_format for backward compatibility with std cmf types"""
! field = self.getField('text')
! field.set(self, value, **kwargs)
! bu = self.getRawText(maybe_baseunit=1)
! if hasattr(bu, 'mimetype'):
! self.text_format = str(bu.mimetype)
!
!
! registerType(Webquest)
Index: WebquestDoc.py
===================================================================
RCS file: /cvsroot/eduplone/Webquest/WebquestDoc.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** WebquestDoc.py 3 Jun 2004 00:08:32 -0000 1.2
--- WebquestDoc.py 29 Nov 2004 14:10:08 -0000 1.3
***************
*** 1,61 ****
! from Products.Archetypes.public import *
from AccessControl import ClassSecurityInfo
! from Products.CMFCore import CMFCorePermissions
!
! schema = BaseSchema + Schema((
! TextField('text',
! required = 1,
! searchable = 1,
! default_output_type="text/html",
! default_content_type="text/structured",
! allowable_content_types = ('text/html',
! 'text/structured',
! 'text/plain'),
! widget=VisualWidget(label_msgid="label_body",
! label="Body text",
! description_msgid = "desc_body",
! i18n_domain = "plone",
! rows=10),
!
! ),
!
! ))
!
!
! class WebquestDoc(BaseContent):
! """A simple archetype"""
! schema = schema
! content_icon = "document_icon.gif"
! meta_type = "WebquestDoc"
! archetype_name = "WebquestDoc"
! product_meta_type = "WebquestDoc"
! global_allow = 0
!
! actions = ({
! 'id': 'view',
! 'name': 'View',
! 'action': 'string:${object_url}/webquestdoc_view',
! 'permissions': (CMFCorePermissions.View,)
! },)
!
! security = ClassSecurityInfo()
!
! security.declarePublic('CookedBody')
! def CookedBody(self):
! """Dummy attribute to allow drop-in replacement of Document"""
! return self.getText()
!
! def setText(self, value, **kwargs):
! """set text_format for backward compatibility with std cmf types"""
! field = self.getField('text')
! field.set(self, value, **kwargs)
! bu = self.getRawText(maybe_baseunit=1)
! if hasattr(bu, 'mimetype'):
! self.text_format = str(bu.mimetype)
!
!
! registerType(WebquestDoc)
!
! def modify_fti(fti):
! fti['global_allow'] = 0
! return fti
--- 1,61 ----
! from Products.Archetypes.public import *
from AccessControl import ClassSecurityInfo
! from Products.CMFCore import CMFCorePermissions
!
! schema = BaseSchema + Schema((
! TextField('text',
! required = 1,
! searchable = 1,
! default_output_type="text/html",
! default_content_type="text/structured",
! allowable_content_types = ('text/html',
! 'text/structured',
! 'text/plain'),
! widget=VisualWidget(label_msgid="label_body",
! label="Body text",
! description_msgid = "desc_body",
! i18n_domain = "plone",
! rows=10),
!
! ),
!
! ))
!
!
! class WebquestDoc(BaseContent):
! """A simple archetype"""
! schema = schema
! content_icon = "document_icon.gif"
! meta_type = "WebquestDoc"
! archetype_name = "WebquestDoc"
! product_meta_type = "WebquestDoc"
! global_allow = 0
!
! actions = ({
! 'id': 'view',
! 'name': 'View',
! 'action': 'string:${object_url}/webquestdoc_view',
! 'permissions': (CMFCorePermissions.View,)
! },)
!
! security = ClassSecurityInfo()
!
! security.declarePublic('CookedBody')
! def CookedBody(self):
! """Dummy attribute to allow drop-in replacement of Document"""
! return self.getText()
!
! def setText(self, value, **kwargs):
! """set text_format for backward compatibility with std cmf types"""
! field = self.getField('text')
! field.set(self, value, **kwargs)
! bu = self.getRawText(maybe_baseunit=1)
! if hasattr(bu, 'mimetype'):
! self.text_format = str(bu.mimetype)
!
!
! registerType(WebquestDoc)
!
! def modify_fti(fti):
! fti['global_allow'] = 0
! return fti
-------------------------------------------------------
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/