Changeset 7819


Ignore:
Timestamp:
8 Mar 2012, 22:28:46 (13 years ago)
Author:
Henrik Bettermann
Message:

KOFA -> Kofa

Location:
main/waeup.kofa/trunk
Files:
98 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/README.txt

    r7808 r7819  
    1 What is WAeUP.KOFA ?
     1What is WAeUP.Kofa ?
    22********************
    33
    4 The WAeUP Student Information and Registration Portal (WAeUP.KOFA) is
     4The WAeUP Student Information and Registration Portal (WAeUP.Kofa) is
    55a web-based management tool for managing universities and schools.
    66
  • main/waeup.kofa/trunk/src/waeup/kofa/__init__.py

    r7811 r7819  
    11import grok
    2 from waeup.kofa.interfaces import IKOFAObject
     2from waeup.kofa.interfaces import IKofaObject
    33from zope.annotation.attribute import AttributeAnnotations
    44from zope.annotation.interfaces import IAnnotations
    55
    6 class KOFAAttributeAnnotations(AttributeAnnotations, grok.Adapter):
    7     """An adapter to IAnnotations for any KOFAObject.
     6class KofaAttributeAnnotations(AttributeAnnotations, grok.Adapter):
     7    """An adapter to IAnnotations for any KofaObject.
    88
    9     Providing this adapter, each KOFA object becomes (attribute)
     9    Providing this adapter, each Kofa object becomes (attribute)
    1010    annotatable.
    1111    """
    1212    grok.provides(IAnnotations)
    13     grok.context(IKOFAObject)
     13    grok.context(IKofaObject)
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.py

    r7811 r7819  
    3131from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    3232from random import SystemRandom as random
    33 from waeup.kofa.interfaces import IKOFAPluggable, IObjectHistory
     33from waeup.kofa.interfaces import IKofaPluggable, IObjectHistory
    3434from waeup.kofa.utils.logger import Logger
    3535from waeup.kofa.accesscodes.interfaces import (
     
    415415class AccessCodePlugin(grok.GlobalUtility):
    416416    grok.name('accesscodes')
    417     grok.implements(IKOFAPluggable)
     417    grok.implements(IKofaPluggable)
    418418
    419419    def setup(self, site, name, logger):
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.txt

    r7811 r7819  
    77
    88.. :NOdoctest:
    9 .. :NOlayer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :NOlayer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111About access-codes
     
    591591.. class:: AccessCodePlugin
    592592
    593   A `waeup.kofa` plugin that updates existing KOFA university
     593  A `waeup.kofa` plugin that updates existing Kofa university
    594594  instances so that they provide support for access-codes.
    595595
    596   .. attribute:: grok.implements(IKOFAPluggable)
     596  .. attribute:: grok.implements(IKofaPluggable)
    597597  .. attribute:: grok.name('accesscodes')
    598598
     
    608608
    609609  The AccessCodePlugin is available as a global named utility for the
    610   IKOFAPluggable interface named ``accesscodes``.
     610  IKofaPluggable interface named ``accesscodes``.
    611611
    612612  It is looked up by a university instance when created, so that this
     
    615615
    616616    >>> from zope.component import getUtility
    617     >>> from waeup.kofa.interfaces import IKOFAPluggable
    618     >>> plugin = getUtility(IKOFAPluggable, name='accesscodes')
     617    >>> from waeup.kofa.interfaces import IKofaPluggable
     618    >>> plugin = getUtility(IKofaPluggable, name='accesscodes')
    619619    >>> plugin
    620620    <waeup.kofa.accesscodes.accesscodes.AccessCodePlugin object at 0x...>
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.py

    r7811 r7819  
    2222from hurry.workflow.interfaces import InvalidTransitionError
    2323from waeup.kofa.browser.resources import datatable
    24 from waeup.kofa.browser import KOFAPage, KOFAAddFormPage, NullValidator
     24from waeup.kofa.browser import KofaPage, KofaAddFormPage, NullValidator
    2525from waeup.kofa.browser.breadcrumbs import Breadcrumb
    2626from waeup.kofa.browser.viewlets import (
    2727    AdminTask, AddActionButton, SearchActionButton, BatchOpButton, ManageLink)
    28 from waeup.kofa.interfaces import IKOFAObject
     28from waeup.kofa.interfaces import IKofaObject
    2929from waeup.kofa.interfaces import MessageFactory as _
    3030from waeup.kofa.accesscodes.interfaces import (
     
    3434from waeup.kofa.browser.layout import action
    3535
    36 grok.context(IKOFAObject)
    37 
    38 class BatchContainerPage(KOFAPage):
     36grok.context(IKofaObject)
     37
     38class BatchContainerPage(KofaPage):
    3939    grok.name('index')
    4040    grok.context(IAccessCodeBatchContainer)
     
    7070            self.context.logger_info(ob_class, message)
    7171
    72 class AddBatchPage(KOFAAddFormPage):
     72class AddBatchPage(KofaAddFormPage):
    7373    grok.name('add')
    7474    grok.context(IAccessCodeBatchContainer)
     
    103103        self.redirect(self.url(self.context))
    104104
    105 class ReimportBatchPage(KOFAPage):
     105class ReimportBatchPage(KofaPage):
    106106    """Screen for reimporting AC batches.
    107107    """
     
    144144        self.redirect(self.url(self.context))
    145145
    146 class BatchContainerSearchPage(KOFAPage):
     146class BatchContainerSearchPage(KofaPage):
    147147    grok.name('search')
    148148    grok.context(IAccessCodeBatchContainer)
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.txt

    r7811 r7819  
    44.. module:: waeup.kofa.accesscodes.browser
    55
    6 Here we visit the access-code related parts of a KOFA site using
     6Here we visit the access-code related parts of a Kofa site using
    77a virtual browser.
    88
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/interfaces.py

    r7811 r7819  
    2020from zope import schema
    2121from zope.interface import Interface
    22 from waeup.kofa.interfaces import IKOFAObject
     22from waeup.kofa.interfaces import IKofaObject
    2323from waeup.kofa.interfaces import MessageFactory as _
    2424
    25 class IAccessCode(IKOFAObject):
     25class IAccessCode(IKofaObject):
    2626    """An access code.
    2727    """
     
    9292        )
    9393
    94 class IAccessCodeBatchContainer(IKOFAObject):
     94class IAccessCodeBatchContainer(IKofaObject):
    9595    """A container for access code batches.
    9696    """
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/tests/test_accesscode.py

    r7811 r7819  
    2929from zope.testing import renormalizing
    3030from waeup.kofa.app import University
    31 from waeup.kofa.interfaces import IObjectHistory, IKOFAPluggable
     31from waeup.kofa.interfaces import IObjectHistory, IKofaPluggable
    3232from waeup.kofa.testing import (
    3333    FunctionalLayer, FunctionalTestCase, setUp, tearDown, getRootFolder)
     
    412412    def test_iface(self):
    413413        plugin = AccessCodePlugin()
    414         assert verifyObject(IKOFAPluggable, plugin)
    415         assert verifyClass(IKOFAPluggable, AccessCodePlugin)
     414        assert verifyObject(IKofaPluggable, plugin)
     415        assert verifyClass(IKofaPluggable, AccessCodePlugin)
    416416
    417417    def test_update_w_ac_container(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/workflow.py

    r7811 r7819  
    2626from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
    2727from waeup.kofa.accesscodes.interfaces import IAccessCode
    28 from waeup.kofa.interfaces import IObjectHistory, IKOFAWorkflowInfo
     28from waeup.kofa.interfaces import IObjectHistory, IKofaWorkflowInfo
    2929from waeup.kofa.interfaces import MessageFactory as _
    30 from waeup.kofa.workflow import KOFAWorkflow, KOFAWorkflowInfo
     30from waeup.kofa.workflow import KofaWorkflow, KofaWorkflowInfo
    3131
    3232INITIALIZED = 'initialized'
     
    113113    )
    114114
    115 accesscode_workflow = KOFAWorkflow(ACCESSCODE_TRANSITIONS)
     115accesscode_workflow = KofaWorkflow(ACCESSCODE_TRANSITIONS)
    116116
    117117class AccessCodeWorkflowState(WorkflowState, grok.Adapter):
     
    122122    state_id = 'wf.accesscode.id'
    123123
    124 class AccessCodeWorkflowInfo(KOFAWorkflowInfo, grok.Adapter):
     124class AccessCodeWorkflowInfo(KofaWorkflowInfo, grok.Adapter):
    125125    grok.context(IAccessCode)
    126     grok.provides(IKOFAWorkflowInfo)
     126    grok.provides(IKofaWorkflowInfo)
    127127
    128128    def __init__(self, context):
  • main/waeup.kofa/trunk/src/waeup/kofa/app.py

    r7811 r7819  
    2626from waeup.kofa.hostels.container import HostelsContainer
    2727from waeup.kofa.interfaces import (
    28     IUniversity, IKOFAPluggable, IObjectUpgradeEvent, )
     28    IUniversity, IKofaPluggable, IObjectUpgradeEvent, )
    2929from waeup.kofa.userscontainer import UsersContainer
    3030from waeup.kofa.utils.logger import Logger
     
    6464        """Create instances of all plugins defined somewhere.
    6565        """
    66         for name, plugin in getUtilitiesFor(IKOFAPluggable):
     66        for name, plugin in getUtilitiesFor(IKofaPluggable):
    6767            plugin.setup(self, name, self.logger)
    6868        return
     
    7676        self.logger.info('Done.')
    7777        self.logger.info('Now upgrading any plugins.')
    78         for name, plugin in getUtilitiesFor(IKOFAPluggable):
     78        for name, plugin in getUtilitiesFor(IKofaPluggable):
    7979            plugin.update(self, name, self.logger)
    8080        self.logger.info('Plugin update finished.')
  • main/waeup.kofa/trunk/src/waeup/kofa/app.txt

    r7811 r7819  
    1 :mod:`waeup.kofa.app` -- central components for KOFA
     1:mod:`waeup.kofa.app` -- central components for Kofa
    22****************************************************
    33
    44.. :doctest:
    5 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     5.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    66
    77.. module:: waeup.kofa.app
     
    99.. class:: University
    1010
    11   The main KOFA application object is given with
     11  The main Kofa application object is given with
    1212  :class:`University`. It provides the main containers as faculties,
    1313  hostels, etc.
     
    7676first::
    7777
    78   >>> from waeup.kofa.interfaces import IKOFAExporter
    79   >>> exporter = IKOFAExporter(myuniversity)
     78  >>> from waeup.kofa.interfaces import IKofaExporter
     79  >>> exporter = IKofaExporter(myuniversity)
    8080  >>> exporter
    8181  <waeup.kofa.utils.importexport.Exporter object at 0x...>
     
    9090memory file::
    9191
    92   >>> from waeup.kofa.interfaces import IKOFAXMLExporter
    93   >>> exporter = IKOFAXMLExporter(myuniversity)
     92  >>> from waeup.kofa.interfaces import IKofaXMLExporter
     93  >>> exporter = IKofaXMLExporter(myuniversity)
    9494  >>> f = exporter.export()
    9595  >>> f
     
    103103  </pickle>
    104104
    105 KOFA plugins
     105Kofa plugins
    106106============
    107107
    108108waeup.kofa provides an API to 'plugin' components. Things that should
    109 be setup at creation time of a KOFA application can indicate
    110 that by providing a utility providing IKOFAPlugin.
     109be setup at creation time of a Kofa application can indicate
     110that by providing a utility providing IKofaPlugin.
    111111
    112112The plugins are looked up by an created app, which then will call the
    113113``setup()`` method of each plugin.
    114114
    115    >>> from waeup.kofa.interfaces import IKOFAPluggable
     115   >>> from waeup.kofa.interfaces import IKofaPluggable
    116116   >>> from zope.component import getAdapters, getUtilitiesFor
    117    >>> sorted(list(getUtilitiesFor(IKOFAPluggable)))
     117   >>> sorted(list(getUtilitiesFor(IKofaPluggable)))
    118118   [(u'accesscodes', <waeup.kofa.accesscodes...AccessCodePlugin ...)]
    119119
     
    122122
    123123   >>> import grok
    124    >>> from waeup.kofa.interfaces import IKOFAPluggable
     124   >>> from waeup.kofa.interfaces import IKofaPluggable
    125125   >>> class MyPlugin(grok.GlobalUtility):
    126    ...   grok.implements(IKOFAPluggable)
     126   ...   grok.implements(IKofaPluggable)
    127127   ...   def setup(self, site, name, logger):
    128128   ...     print "Setup was called for"
     
    136136   True
    137137
    138 and setup a new KOFA instance, we will get a message:
     138and setup a new Kofa instance, we will get a message:
    139139
    140140   >>> from waeup.kofa.app import University
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py

    r7811 r7819  
    2727from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    2828from waeup.kofa.app import University
    29 from waeup.kofa.image import KOFAImageFile
     29from waeup.kofa.image import KofaImageFile
    3030from waeup.kofa.imagestorage import DefaultFileStoreHandler
    3131from waeup.kofa.interfaces import (
    32     IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, IKOFAUtils,
     32    IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, IKofaUtils,
    3333    IExtFileStore, IPDF, IUserAccount)
    3434from waeup.kofa.students.vocabularies import RegNumNotInSource
     
    7676    def display_fullname(self):
    7777        middlename = getattr(self, 'middlename', None)
    78         kofa_utils = getUtility(IKOFAUtils)
     78        kofa_utils = getUtility(IKofaUtils)
    7979        return kofa_utils.fullname(self.firstname, self.lastname, middlename)
    8080
     
    291291            ApplicantImageStoreHandler, self).createFile(
    292292            store, root,  filename, file_id, file)
    293         return file, path, KOFAImageFile(
     293        return file, path, KofaImageFile(
    294294            file_obj.filename, file_obj.data)
    295295
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r7811 r7819  
    3535from waeup.kofa.applicants.workflow import INITIALIZED, STARTED, PAID, SUBMITTED
    3636from waeup.kofa.browser import (
    37     KOFAPage, KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
     37    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
    3838    DEFAULT_PASSPORT_IMAGE_PATH)
    3939from waeup.kofa.browser.interfaces import ICaptchaManager
     
    4444from waeup.kofa.browser.resources import datepicker, tabs, datatable, warning
    4545from waeup.kofa.interfaces import (
    46     IKOFAObject, ILocalRolesAssignable, IExtFileStore, IPDF,
    47     IFileStoreNameChooser, IPasswordValidator, IUserAccount, IKOFAUtils)
     46    IKofaObject, ILocalRolesAssignable, IExtFileStore, IPDF,
     47    IFileStoreNameChooser, IPasswordValidator, IUserAccount, IKofaUtils)
    4848from waeup.kofa.interfaces import MessageFactory as _
    4949from waeup.kofa.permissions import get_users_with_local_roles
     
    5656from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
    5757
    58 grok.context(IKOFAObject) # Make IKOFAObject the default context
    59 
    60 class ApplicantsRootPage(KOFAPage):
     58grok.context(IKofaObject) # Make IKofaObject the default context
     59
     60class ApplicantsRootPage(KofaPage):
    6161    grok.context(IApplicantsRoot)
    6262    grok.name('index')
     
    7070        return
    7171
    72 class ApplicantsRootManageFormPage(KOFAEditFormPage):
     72class ApplicantsRootManageFormPage(KofaEditFormPage):
    7373    grok.context(IApplicantsRoot)
    7474    grok.name('manage')
     
    141141        return del_local_roles(self,3,**data)
    142142
    143 class ApplicantsContainerAddFormPage(KOFAAddFormPage):
     143class ApplicantsContainerAddFormPage(KofaAddFormPage):
    144144    grok.context(IApplicantsRoot)
    145145    grok.require('waeup.manageApplication')
     
    215215        return self.context.p_id
    216216
    217 class ApplicantsContainerPage(KOFADisplayFormPage):
     217class ApplicantsContainerPage(KofaDisplayFormPage):
    218218    """The standard view for regular applicant containers.
    219219    """
     
    232232    @property
    233233    def introduction(self):
    234         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     234        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    235235        lang = self.request.cookies.get('kofa.language', portal_language)
    236236        html = self.context.description_dict.get(lang,'')
     
    246246        return "%s" % self.context.title
    247247
    248 class ApplicantsContainerManageFormPage(KOFAEditFormPage):
     248class ApplicantsContainerManageFormPage(KofaEditFormPage):
    249249    grok.context(IApplicantsContainer)
    250250    grok.name('manage')
     
    349349        return del_local_roles(self,3,**data)
    350350
    351 class ApplicantAddFormPage(KOFAAddFormPage):
     351class ApplicantAddFormPage(KofaAddFormPage):
    352352    """Add-form to add an applicant.
    353353    """
     
    372372        return
    373373
    374 class ApplicantDisplayFormPage(KOFADisplayFormPage):
     374class ApplicantDisplayFormPage(KofaDisplayFormPage):
    375375    grok.context(IApplicant)
    376376    grok.name('index')
     
    484484
    485485
    486 class OnlinePaymentDisplayFormPage(KOFADisplayFormPage):
     486class OnlinePaymentDisplayFormPage(KofaDisplayFormPage):
    487487    """ Page to view an online payment ticket
    488488    """
     
    547547    @property
    548548    def title(self):
    549         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     549        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    550550        return translate(_('Payment Data'), 'waeup.kofa',
    551551            target_language=portal_language)
     
    553553    @property
    554554    def label(self):
    555         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     555        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    556556        return translate(_('Online Payment Receipt'),
    557557            'waeup.kofa', target_language=portal_language) \
     
    582582    #@property
    583583    #def label(self):
    584     #    portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     584    #    portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    585585    #    container_title = self.context.__parent__.title
    586586    #    label = translate('Application Record',
     
    638638    return True
    639639
    640 class ApplicantManageFormPage(KOFAEditFormPage):
     640class ApplicantManageFormPage(KofaEditFormPage):
    641641    """A full edit view for applicant data.
    642642    """
     
    883883        return image
    884884
    885 class ApplicantRegistrationPage(KOFAAddFormPage):
     885class ApplicantRegistrationPage(KofaAddFormPage):
    886886    """Captcha'd registration page for applicants.
    887887    """
     
    926926        self.applyData(applicant, **data)
    927927        self.context.addApplicant(applicant)
    928         kofa_utils = getUtility(IKOFAUtils)
     928        kofa_utils = getUtility(IKofaUtils)
    929929        password = kofa_utils.genPassword()
    930930        IUserAccount(applicant).setPassword(password)
     
    941941        return
    942942
    943 class ApplicantRegistrationEmailSent(KOFAPage):
     943class ApplicantRegistrationEmailSent(KofaPage):
    944944    """Landing page after successful registration.
    945945    """
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r7811 r7819  
    2929from waeup.kofa.schema import TextLineChoice
    3030from waeup.kofa.interfaces import (
    31     IKOFAObject, year_range, validate_email, academic_sessions_vocab)
     31    IKofaObject, year_range, validate_email, academic_sessions_vocab)
    3232from waeup.kofa.interfaces import MessageFactory as _
    3333from waeup.kofa.payments.interfaces import IOnlinePayment
     
    178178    pass
    179179
    180 class IApplicantsRoot(IKOFAObject, IContainer):
     180class IApplicantsRoot(IKofaObject, IContainer):
    181181    """A container for university applicants containers.
    182182    """
    183183    pass
    184184
    185 class IApplicantsContainer(IKOFAObject):
     185class IApplicantsContainer(IKofaObject):
    186186    """An applicants container contains university applicants.
    187187
     
    352352    'provider'].order =  IApplicantsContainer['provider'].order
    353353
    354 class IApplicantBaseData(IKOFAObject):
     354class IApplicantBaseData(IKofaObject):
    355355    """The data for an applicant.
    356356
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py

    r7811 r7819  
    3434from waeup.kofa.applicants.interfaces import IApplicant
    3535from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH
    36 from waeup.kofa.interfaces import IExtFileStore, IPDF, IKOFAUtils
     36from waeup.kofa.interfaces import IExtFileStore, IPDF, IKofaUtils
    3737from waeup.kofa.interfaces import MessageFactory as _
    3838
     
    5454    def title(self):
    5555        container_title = self.context.__parent__.title
    56         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     56        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    5757        ar_translation = translate(_('Application Record'),
    5858            'waeup.kofa', target_language=portal_language)
     
    107107        if dept is None:
    108108            return data
    109         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     109        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    110110        dp_translation = translate(_('Department:'),
    111111            'waeup.kofa', target_language=portal_language)
     
    145145            pdf.setAuthor('%s (%s)' % (view.request.principal.title,
    146146                view.request.principal.id))
    147         pdf.setCreator('KOFA')
     147        pdf.setCreator('Kofa')
    148148        width, height = A4
    149149        style = getSampleStyleSheet()
     
    171171        # Render widget fields
    172172        widgets = self._setUpWidgets()
    173         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     173        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    174174        for widget in widgets: # self.widgets:
    175175            f_label = '<font size=12>%s</font>:' % translate(
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/root.py

    r7811 r7819  
    2323from hurry.query.interfaces import IQuery
    2424from zope.component import getUtility
    25 from waeup.kofa.interfaces import IKOFAPluggable
     25from waeup.kofa.interfaces import IKofaPluggable
    2626from waeup.kofa.applicants.interfaces import IApplicantsRoot
    2727from waeup.kofa.utils.logger import Logger
     
    4646
    4747class ApplicantsPlugin(grok.GlobalUtility):
    48     """A KOFAPlugin that creates an applicants root in portal.
     48    """A KofaPlugin that creates an applicants root in portal.
    4949
    5050    This plugin should be called by a typical
     
    5353    the main site configuration.
    5454
    55     Implements :class:`waeup.kofa.interfaces.IKOFAPluggable`
     55    Implements :class:`waeup.kofa.interfaces.IKofaPluggable`
    5656    """
    5757    grok.name('applicants')
    58     grok.implements(IKOFAPluggable)
     58    grok.implements(IKofaPluggable)
    5959    log_prefix = 'ApplicantsPlugin'
    6060
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py

    r7811 r7819  
    2626from zope.interface import verify, implements
    2727from zope.location.interfaces import ILocation
    28 from waeup.kofa.image.interfaces import IKOFAImageFile
     28from waeup.kofa.image.interfaces import IKofaImageFile
    2929from waeup.kofa.imagestorage import DefaultStorage
    3030from waeup.kofa.interfaces import IFileStoreHandler, IFileStoreNameChooser
     
    3838class FakeImageLocation(object):
    3939    implements(ILocation)
    40     adapts(IKOFAImageFile)
     40    adapts(IKofaImageFile)
    4141    def __init__(self, context):
    4242        pass
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/viewlets.py

    r7811 r7819  
    1818import grok
    1919from hurry.workflow.interfaces import IWorkflowState
    20 from waeup.kofa.interfaces import IKOFAObject
     20from waeup.kofa.interfaces import IKofaObject
    2121from waeup.kofa.students.viewlets import PrimaryStudentNavTab
    2222from waeup.kofa.browser.viewlets import ManageActionButton, PrimaryNavTab
     
    3232from waeup.kofa.interfaces import MessageFactory as _
    3333
    34 grok.context(IKOFAObject) # Make IKOFAObject the default context
     34grok.context(IKofaObject) # Make IKofaObject the default context
    3535grok.templatedir('browser_templates')
    3636
     
    3838    """Applicants tab in primary navigation.
    3939    """
    40     grok.context(IKOFAObject)
     40    grok.context(IKofaObject)
    4141    grok.order(3)
    4242    grok.require('waeup.viewApplicantsTab')
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/workflow.py

    r7811 r7819  
    2222from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
    2323from waeup.kofa.applicants.interfaces import IApplicantBaseData
    24 from waeup.kofa.interfaces import IObjectHistory, IKOFAWorkflowInfo, IKOFAUtils
     24from waeup.kofa.interfaces import IObjectHistory, IKofaWorkflowInfo, IKofaUtils
    2525from waeup.kofa.interfaces import MessageFactory as _
    26 from waeup.kofa.workflow import KOFAWorkflow, KOFAWorkflowInfo
     26from waeup.kofa.workflow import KofaWorkflow, KofaWorkflowInfo
    2727
    2828INITIALIZED = 'initialized'
     
    137137    )
    138138
    139 application_workflow = KOFAWorkflow(APPLICATION_TRANSITIONS)
     139application_workflow = KofaWorkflow(APPLICATION_TRANSITIONS)
    140140
    141141class ApplicationWorkflowState(WorkflowState, grok.Adapter):
     
    148148    state_id = 'wf.application.id'
    149149
    150 class ApplicationWorkflowInfo(KOFAWorkflowInfo, grok.Adapter):
     150class ApplicationWorkflowInfo(KofaWorkflowInfo, grok.Adapter):
    151151    """Adapter to adapt Applicant objects to workflow info objects.
    152152    """
    153153    grok.context(IApplicantBaseData)
    154     grok.provides(IKOFAWorkflowInfo)
     154    grok.provides(IKofaWorkflowInfo)
    155155
    156156    def __init__(self, context):
  • main/waeup.kofa/trunk/src/waeup/kofa/authentication.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Authentication for KOFA.
     18"""Authentication for Kofa.
    1919"""
    2020import grok
     
    3434from waeup.kofa.interfaces import (ILocalRoleSetEvent,
    3535    IUserAccount, IAuthPluginUtility, IPasswordValidator,
    36     IKOFAPrincipal, IKOFAPrincipalInfo)
     36    IKofaPrincipal, IKofaPrincipalInfo)
    3737
    3838def setup_authentication(pau):
     
    6363    return principalRoleManager
    6464
    65 class KOFASessionCredentialsPlugin(grok.GlobalUtility,
     65class KofaSessionCredentialsPlugin(grok.GlobalUtility,
    6666                                    SessionCredentialsPlugin):
    6767    grok.provides(ICredentialsPlugin)
     
    7272    passwordfield = 'form.password'
    7373
    74 class KOFAPrincipalInfo(object):
    75     """An implementation of IKOFAPrincipalInfo.
    76 
    77     A KOFA principal info is created with id, login, title, description,
     74class KofaPrincipalInfo(object):
     75    """An implementation of IKofaPrincipalInfo.
     76
     77    A Kofa principal info is created with id, login, title, description,
    7878    phone, email and user_type.
    7979    """
    80     grok.implements(IKOFAPrincipalInfo)
     80    grok.implements(IKofaPrincipalInfo)
    8181
    8282    def __init__(self, id, title, description, email, phone, user_type):
     
    9090        self.authenticatorPlugin = None
    9191
    92 class KOFAPrincipal(Principal):
     92class KofaPrincipal(Principal):
    9393    """A portal principal.
    9494
    95     KOFA principals provide an extra `email`, `phone` and `user_type`
     95    Kofa principals provide an extra `email`, `phone` and `user_type`
    9696    attribute extending ordinary principals.
    9797    """
    9898
    99     grok.implements(IKOFAPrincipal)
     99    grok.implements(IKofaPrincipal)
    100100
    101101    def __init__(self, id, title=u'', description=u'', email=u'',
     
    112112
    113113    def __repr__(self):
    114         return 'KOFAPrincipal(%r)' % self.id
    115 
    116 class AuthenticatedKOFAPrincipalFactory(grok.MultiAdapter):
    117     """Creates 'authenticated' KOFA principals.
    118 
    119     Adapts (principal info, request) to a KOFAPrincipal instance.
     114        return 'KofaPrincipal(%r)' % self.id
     115
     116class AuthenticatedKofaPrincipalFactory(grok.MultiAdapter):
     117    """Creates 'authenticated' Kofa principals.
     118
     119    Adapts (principal info, request) to a KofaPrincipal instance.
    120120
    121121    This adapter is used by the standard PAU to transform
    122     KOFAPrincipalInfos into KOFAPrincipal instances.
    123     """
    124     grok.adapts(IKOFAPrincipalInfo, IRequest)
     122    KofaPrincipalInfos into KofaPrincipal instances.
     123    """
     124    grok.adapts(IKofaPrincipalInfo, IRequest)
    125125    grok.implements(IAuthenticatedPrincipalFactory)
    126126
     
    130130
    131131    def __call__(self, authentication):
    132         principal = KOFAPrincipal(
     132        principal = KofaPrincipal(
    133133            self.info.id,
    134134            self.info.title,
     
    224224        if not account.checkPassword(credentials['password']):
    225225            return None
    226         return KOFAPrincipalInfo(
     226        return KofaPrincipalInfo(
    227227            id=account.name,
    228228            title=account.title,
     
    236236        if account is None:
    237237            return None
    238         return KOFAPrincipalInfo(
     238        return KofaPrincipalInfo(
    239239            id=account.name,
    240240            title=account.title,
  • main/waeup.kofa/trunk/src/waeup/kofa/authentication.txt

    r7811 r7819  
    1 KOFA authentication
     1Kofa authentication
    22*******************
    33
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/__init__.py

    r7811 r7819  
    22
    33from waeup.kofa.browser.layout import (
    4     KOFAPage, KOFAForm, KOFALayout, KOFADisplayFormPage, KOFAEditFormPage,
    5     KOFAAddFormPage, NullValidator)
     4    KofaPage, KofaForm, KofaLayout, KofaDisplayFormPage, KofaEditFormPage,
     5    KofaAddFormPage, NullValidator)
    66from waeup.kofa.browser.pages import ContactAdminForm
    77
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.py

    r7811 r7819  
    3434    """
    3535    grok.provides(IBreadcrumb)
    36     grok.context(interfaces.IKOFAObject)
     36    grok.context(interfaces.IKofaObject)
    3737    grok.name('index')
    3838
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt

    r7811 r7819  
    1 Browsing KOFA
     1Browsing Kofa
    22*************
    33
    4 Here we visit all parts of a KOFA portal using a browser.
     4Here we visit all parts of a Kofa portal using a browser.
    55
    66University
     
    3535  >>> print browser.contents
    3636  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    37   ...Welcome to WAeUP.KOFA...
     37  ...Welcome to WAeUP.Kofa...
    3838  ...
    3939
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py

    r7811 r7819  
    2828from zope.interface import Interface
    2929from zope.publisher.interfaces.http import IHTTPRequest
    30 from waeup.kofa.browser import KOFAPage
     30from waeup.kofa.browser import KofaPage
    3131from waeup.kofa.browser.interfaces import (
    3232    ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig,
     
    171171    """ReCaptcha - strong captchas with images, sound, etc.
    172172
    173     This is the KOFA implementation to support captchas as provided by
     173    This is the Kofa implementation to support captchas as provided by
    174174    http://www.google.com/recaptcha.
    175175
     
    266266            headers = {
    267267                "Content-type": "application/x-www-form-urlencoded",
    268                 "User-agent": "reCAPTCHA Python KOFA",
     268                "User-agent": "reCAPTCHA Python Kofa",
    269269                }
    270270            )
     
    319319
    320320
    321 class CaptchaTestPage(KOFAPage):
     321class CaptchaTestPage(KofaPage):
    322322    # A test page to see a captcha in action
    323323    grok.name('captcha')
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/exceptions.py

    r7817 r7819  
    2222from zope.publisher.interfaces import INotFound
    2323from zope.security.interfaces import IUnauthorized
    24 from waeup.kofa.browser.layout import KOFAPage
     24from waeup.kofa.browser.layout import KofaPage
    2525
    2626grok.templatedir('templates')
     
    6161
    6262
    63 class NotFoundPage(KOFAPage):
     63class NotFoundPage(KofaPage):
    6464    """A page rendered when an object cannot be found.
    6565
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py

    r7811 r7819  
    2121from zope.interface import Interface, Attribute
    2222from waeup.kofa.interfaces import (
    23     IKOFAObject, IUniversity, IUsersContainer, IDataCenter)
     23    IKofaObject, IUniversity, IUsersContainer, IDataCenter)
    2424from waeup.kofa.university.interfaces import (
    2525    IFacultiesContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd,
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py

    r7811 r7819  
    3333from zope.interface import Interface
    3434from zope.site.hooks import getSite
    35 from waeup.kofa.interfaces import IKOFAObject, IUserAccount
     35from waeup.kofa.interfaces import IKofaObject, IUserAccount
    3636from waeup.kofa.browser.interfaces import ITheme
    37 from waeup.kofa.browser.theming import get_all_themes, KOFAThemeBase
     37from waeup.kofa.browser.theming import get_all_themes, KofaThemeBase
    3838from waeup.kofa.students.interfaces import IStudentNavigation
    3939from waeup.kofa.applicants.interfaces import IApplicant
     
    5656
    5757    def __call__(self, success):
    58         action = KOFAAction(self.label, success=success, **self.options)
     58        action = KofaAction(self.label, success=success, **self.options)
    5959        self.actions.append(action)
    6060        return action
    6161
    62 class KOFAAction(Action):
     62class KofaAction(Action):
    6363
    6464    def __init__(self, label, style='', **options):
    65         super(KOFAAction, self).__init__(label, **options)
     65        super(KofaAction, self).__init__(label, **options)
    6666        self.style = style
    6767
     
    150150        return True
    151151
    152 class KOFALayout(UtilityView,Layout):
     152class KofaLayout(UtilityView,Layout):
    153153    """A megrok.layout.Layout with additional methods.
    154154    """
    155155    grok.baseclass()
    156156
    157 class KOFAForm(UtilityView,Form):
     157class KofaForm(UtilityView,Form):
    158158    """A megrok.layout.Form with additional methods.
    159159    """
     
    161161
    162162    def setUpWidgets(self,ignore_request=False):
    163         super(KOFAForm,self).setUpWidgets(ignore_request)
     163        super(KofaForm,self).setUpWidgets(ignore_request)
    164164        # Width parameters will be overridden by Bootstrap
    165165        # so we have to set the css class
     
    171171            self.widgets['body'].cssClass = 'span9'
    172172
    173 class KOFAPage(UtilityView,Page):
     173class KofaPage(UtilityView,Page):
    174174    """A megrok.layout page with additional methods.
    175175    """
    176176    grok.baseclass()
    177177
    178 class KOFADisplayFormPage(UtilityView,DisplayForm):
     178class KofaDisplayFormPage(UtilityView,DisplayForm):
    179179    """A megrok.layout.DisplayForm with additional methods.
    180180    """
     
    182182    template = default_waeup_display_template
    183183
    184 class KOFAEditFormPage(UtilityView,EditForm):
     184class KofaEditFormPage(UtilityView,EditForm):
    185185    """A megrok.layout.EditForm with additional methods.
    186186    """
     
    189189
    190190    def setUpWidgets(self,ignore_request=False):
    191         super(KOFAEditFormPage,self).setUpWidgets(ignore_request)
     191        super(KofaEditFormPage,self).setUpWidgets(ignore_request)
    192192        for widget in self.widgets:
    193193            if widget.__class__.__name__ == 'TextWidget':
     
    207207            self.widgets['perm_address'].height = 10
    208208
    209 class KOFAAddFormPage(UtilityView,AddForm):
     209class KofaAddFormPage(UtilityView,AddForm):
    210210    """A megrok.layout.AddForm with additional methods.
    211211    """
     
    213213    template = default_waeup_edit_template
    214214
    215 class SiteLayout(KOFALayout):
     215class SiteLayout(KofaLayout):
    216216    """ The general site layout.
    217217    """
    218     grok.context(IKOFAObject)
     218    grok.context(IKofaObject)
    219219
    220220    #: An instance of the default theme to use for the site layout
    221     default_theme = KOFAThemeBase()
     221    default_theme = KofaThemeBase()
    222222    stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt')
    223223    studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt')
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """ Viewing components for KOFA objects.
     18""" Viewing components for Kofa objects.
    1919"""
    2020import copy
     
    3838from zope.session.interfaces import ISession
    3939from waeup.kofa.browser import (
    40     KOFAPage, KOFAForm, KOFAEditFormPage, KOFAAddFormPage,
    41     KOFADisplayFormPage, NullValidator)
     40    KofaPage, KofaForm, KofaEditFormPage, KofaAddFormPage,
     41    KofaDisplayFormPage, NullValidator)
    4242from waeup.kofa.browser.interfaces import (
    4343    IUniversity, IFacultiesContainer, IFaculty, IFacultyAdd,
     
    4747from waeup.kofa.browser.resources import warning, datepicker, tabs, datatable
    4848from waeup.kofa.interfaces import(
    49     IKOFAObject, IUsersContainer, IUserAccount, IDataCenter,
    50     IKOFAXMLImporter, IKOFAXMLExporter, IBatchProcessor,
     49    IKofaObject, IUsersContainer, IUserAccount, IDataCenter,
     50    IKofaXMLImporter, IKofaXMLExporter, IBatchProcessor,
    5151    ILocalRolesAssignable, DuplicationError, IConfigurationContainer,
    5252    ISessionConfiguration, ISessionConfigurationAdd,
    53     IPasswordValidator, IContactForm, IKOFAUtils)
     53    IPasswordValidator, IContactForm, IKofaUtils)
    5454from waeup.kofa.permissions import get_users_with_local_roles, get_all_roles
    5555from waeup.kofa.students.catalog import search as searchstudents
     
    6262from waeup.kofa.browser.layout import jsaction, action, UtilityView
    6363
    64 grok.context(IKOFAObject)
     64grok.context(IKofaObject)
    6565grok.templatedir('templates')
    6666
     
    144144#
    145145
    146 class LoginPage(KOFAPage):
     146class LoginPage(KofaPage):
    147147    """A login page, available for all objects.
    148148    """
    149149    grok.name('login')
    150     grok.context(IKOFAObject)
     150    grok.context(IKofaObject)
    151151    grok.require('waeup.Public')
    152152    label = _(u'Login')
     
    179179
    180180
    181 class LogoutPage(KOFAPage):
     181class LogoutPage(KofaPage):
    182182    """A logout page. Calling this page will log the current user out.
    183183    """
    184     grok.context(IKOFAObject)
     184    grok.context(IKofaObject)
    185185    grok.require('waeup.Public')
    186186    grok.name('logout')
     
    190190            auth = getUtility(IAuthentication)
    191191            ILogout(auth).logout(self.request)
    192             self.flash(_("You have been logged out. Thanks for using WAeUP KOFA!"))
     192            self.flash(_("You have been logged out. Thanks for using WAeUP Kofa!"))
    193193        self.redirect(self.application_url())
    194194
    195195
    196 class LanguageChangePage(KOFAPage):
     196class LanguageChangePage(KofaPage):
    197197    """ Language switch
    198198    """
    199     grok.context(IKOFAObject)
     199    grok.context(IKofaObject)
    200200    grok.name('change_language')
    201201    grok.require('waeup.Public')
     
    213213#
    214214
    215 class ContactAdminForm(KOFAForm):
     215class ContactAdminForm(KofaForm):
    216216    grok.name('contactadmin')
    217217    #grok.context(IUniversity)
     
    242242        usertype = getattr(self.request.principal,
    243243                           'user_type', 'system').title()
    244         kofa_utils = getUtility(IKOFAUtils)
     244        kofa_utils = getUtility(IKofaUtils)
    245245        success = kofa_utils.sendContactForm(
    246246                fullname,email,
     
    263263    @action(_('Send now'), style='primary')
    264264    def send(self, *args, **data):
    265         kofa_utils = getUtility(IKOFAUtils)
     265        kofa_utils = getUtility(IKofaUtils)
    266266        success = kofa_utils.sendContactForm(
    267267                data['fullname'],data['email_from'],
     
    279279#
    280280
    281 class UniversityPage(KOFADisplayFormPage):
     281class UniversityPage(KofaDisplayFormPage):
    282282    """ The main university page.
    283283    """
     
    290290    @property
    291291    def frontpage(self):
    292         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     292        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    293293        lang = self.request.cookies.get('kofa.language', portal_language)
    294294        html = self.context['configuration'].frontpage_dict.get(lang,'')
     
    297297                'configuration'].frontpage_dict.get(portal_language,'')
    298298        if html =='':
    299             return _(u'<h1>Welcome to WAeUP.KOFA</h1>')
     299            return _(u'<h1>Welcome to WAeUP.Kofa</h1>')
    300300        else:
    301301            return html
    302302
    303 class AdministrationPage(KOFAPage):
     303class AdministrationPage(KofaPage):
    304304    """ The administration overview page.
    305305    """
     
    378378#
    379379
    380 class UsersContainerPage(KOFAPage):
     380class UsersContainerPage(KofaPage):
    381381    """Overview page for all local users.
    382382    """
     
    418418        return site_roles_string
    419419
    420 class AddUserFormPage(KOFAAddFormPage):
     420class AddUserFormPage(KofaAddFormPage):
    421421    grok.require('waeup.manageUsers')
    422422    grok.context(IUsersContainer)
     
    456456        self.redirect(self.url(self.context))
    457457
    458 class UserManageFormPage(KOFAEditFormPage):
     458class UserManageFormPage(KofaEditFormPage):
    459459    """Manage a user account.
    460460    """
     
    525525        usertype = getattr(self.request.principal,
    526526                           'user_type', 'system').title()
    527         kofa_utils = getUtility(IKOFAUtils)
     527        kofa_utils = getUtility(IKofaUtils)
    528528        success = kofa_utils.sendContactForm(
    529529                self.request.principal.title,email,
     
    550550        self.widgets['title'].displayWidth = 30
    551551
    552 class MyRolesPage(KOFAPage):
     552class MyRolesPage(KofaPage):
    553553    """Display site roles and local roles assigned to officers.
    554554    """
     
    581581#
    582582
    583 class SearchPage(KOFAPage):
     583class SearchPage(KofaPage):
    584584    """General search page for the academics section.
    585585    """
     
    608608#
    609609
    610 class ConfigurationContainerDisplayFormPage(KOFADisplayFormPage):
     610class ConfigurationContainerDisplayFormPage(KofaDisplayFormPage):
    611611    """View page of the configuration container.
    612612    """
     
    619619    form_fields['frontpage'].custom_widget = ReSTDisplayWidget
    620620
    621 class ConfigurationContainerManageFormPage(KOFAEditFormPage):
     621class ConfigurationContainerManageFormPage(KofaEditFormPage):
    622622    """Manage page of the configuration container. We always use the
    623623    manage page in the UI not the view page, thus we use the index name here.
     
    684684        return
    685685
    686 class SessionConfigurationAddFormPage(KOFAAddFormPage):
     686class SessionConfigurationAddFormPage(KofaAddFormPage):
    687687    """Add a session configuration object to configuration container.
    688688    """
     
    711711        return
    712712
    713 class SessionConfigurationManageFormPage(KOFAEditFormPage):
     713class SessionConfigurationManageFormPage(KofaEditFormPage):
    714714    """Manage session configuration object.
    715715    """
     
    742742#
    743743
    744 class DatacenterPage(KOFAPage):
     744class DatacenterPage(KofaPage):
    745745    grok.context(IDataCenter)
    746746    grok.name('index')
     
    749749    pnav = 0
    750750
    751 class DatacenterUploadPage(KOFAPage):
     751class DatacenterUploadPage(KofaPage):
    752752    grok.context(IDataCenter)
    753753    grok.name('upload')
     
    794794        return '%s_%s%s' % (base, filtered_username, ext.lower())
    795795
    796 class DatacenterImportStep1(KOFAPage):
     796class DatacenterImportStep1(KofaPage):
    797797    """Manual import step 1: choose file
    798798    """
     
    824824            self.redirect(self.url(self.context, '@@import2'))
    825825
    826 class DatacenterImportStep2(KOFAPage):
     826class DatacenterImportStep2(KofaPage):
    827827    """Manual import step 2: choose importer
    828828    """
     
    944944            self.flash(warnings)
    945945
    946 class DatacenterImportStep3(KOFAPage):
     946class DatacenterImportStep3(KofaPage):
    947947    """Manual import step 3: modify header
    948948    """
     
    10521052            self.flash(warnings)
    10531053
    1054 class DatacenterImportStep4(KOFAPage):
     1054class DatacenterImportStep4(KofaPage):
    10551055    """Manual import step 4: do actual import
    10561056    """
     
    11111111            mapping = {'a':linenum - self.warn_num}))
    11121112
    1113 class DatacenterLogsOverview(KOFAPage):
     1113class DatacenterLogsOverview(KofaPage):
    11141114    grok.context(IDataCenter)
    11151115    grok.name('logs')
     
    11331133        self.files = self.context.getLogFiles()
    11341134
    1135 class DatacenterLogsFileview(KOFAPage):
     1135class DatacenterLogsFileview(KofaPage):
    11361136    grok.context(IDataCenter)
    11371137    grok.name('show')
     
    11721172        popen.close()
    11731173
    1174 class DatacenterSettings(KOFAPage):
     1174class DatacenterSettings(KofaPage):
    11751175    grok.context(IDataCenter)
    11761176    grok.name('manage')
     
    12151215
    12161216    def render(self):
    1217         exporter = IKOFAXMLExporter(self.context)
     1217        exporter = IKofaXMLExporter(self.context)
    12181218        xml = exporter.export().read()
    12191219        self.response.setHeader(
     
    12211221        return xml
    12221222
    1223 class ImportXMLPage(KOFAPage):
     1223class ImportXMLPage(KofaPage):
    12241224    """Replace the context object by an object created from an XML
    12251225       representation.
     
    12371237        if not xmlfile:
    12381238            return
    1239         importer = IKOFAXMLImporter(self.context)
     1239        importer = IKofaXMLImporter(self.context)
    12401240        obj = importer.doImport(xmlfile)
    12411241        if type(obj) != type(self.context):
     
    12571257#
    12581258
    1259 class FacultiesContainerPage(KOFAPage):
     1259class FacultiesContainerPage(KofaPage):
    12601260    """ Index page for faculty containers.
    12611261    """
     
    12671267    grok.template('facultypage')
    12681268
    1269 class FacultiesContainerManageFormPage(KOFAEditFormPage):
     1269class FacultiesContainerManageFormPage(KofaEditFormPage):
    12701270    """Manage the basic properties of a `Faculty` instance.
    12711271    """
     
    13021302
    13031303
    1304 class FacultyAddFormPage(KOFAAddFormPage):
     1304class FacultyAddFormPage(KofaAddFormPage):
    13051305    """ Page form to add a new faculty to a faculty container.
    13061306    """
     
    13301330# Faculty pages
    13311331#
    1332 class FacultyPage(KOFAPage):
     1332class FacultyPage(KofaPage):
    13331333    """Index page of faculties.
    13341334    """
     
    13421342        return _('Departments')
    13431343
    1344 class FacultyManageFormPage(KOFAEditFormPage):
     1344class FacultyManageFormPage(KofaEditFormPage):
    13451345    """Manage the basic properties of a `Faculty` instance.
    13461346    """
     
    14161416        return del_local_roles(self,3,**data)
    14171417
    1418 class DepartmentAddFormPage(KOFAAddFormPage):
     1418class DepartmentAddFormPage(KofaAddFormPage):
    14191419    """Add a department to a faculty.
    14201420    """
     
    14461446# Department pages
    14471447#
    1448 class DepartmentPage(KOFAPage):
     1448class DepartmentPage(KofaPage):
    14491449    """Department index page.
    14501450    """
     
    14751475            yield(dict(url=url, name=key, container=val))
    14761476
    1477 class ShowStudentsInDepartmentPage(KOFAPage):
     1477class ShowStudentsInDepartmentPage(KofaPage):
    14781478    """Page that lists all students in the department.
    14791479    """
     
    15101510        return hitlist
    15111511
    1512 class DepartmentManageFormPage(KOFAEditFormPage):
     1512class DepartmentManageFormPage(KofaEditFormPage):
    15131513    """Manage the basic properties of a `Department` instance.
    15141514    """
     
    16121612        return del_local_roles(self,4,**data)
    16131613
    1614 class CourseAddFormPage(KOFAAddFormPage):
     1614class CourseAddFormPage(KofaAddFormPage):
    16151615    """Add-form to add course to a department.
    16161616    """
     
    16491649        return
    16501650
    1651 class CertificateAddFormPage(KOFAAddFormPage):
     1651class CertificateAddFormPage(KofaAddFormPage):
    16521652    """Add-form to add certificate to a department.
    16531653    """
     
    16901690# Courses pages
    16911691#
    1692 class CoursePage(KOFADisplayFormPage):
     1692class CoursePage(KofaDisplayFormPage):
    16931693    """Course index page.
    16941694    """
     
    17031703        return '%s (%s)' % (self.context.title, self.context.code)
    17041704
    1705 class CourseManageFormPage(KOFAEditFormPage):
     1705class CourseManageFormPage(KofaEditFormPage):
    17061706    """Edit form page for courses.
    17071707    """
     
    17341734# Certificate pages
    17351735#
    1736 class CertificatePage(KOFADisplayFormPage):
     1736class CertificatePage(KofaDisplayFormPage):
    17371737    """Index page for certificates.
    17381738    """
     
    17521752        return super(CertificatePage, self).update()
    17531753
    1754 class CertificateManageFormPage(KOFAEditFormPage):
     1754class CertificateManageFormPage(KofaEditFormPage):
    17551755    """Manage the properties of a `Certificate` instance.
    17561756    """
     
    18301830
    18311831
    1832 class CertificateCourseAddFormPage(KOFAAddFormPage):
     1832class CertificateCourseAddFormPage(KofaAddFormPage):
    18331833    """Add-page to add a course ref to a certificate
    18341834    """
     
    18621862# Certificate course pages...
    18631863#
    1864 class CertificateCoursePage(KOFAPage):
     1864class CertificateCoursePage(KofaPage):
    18651865    """CertificateCourse index page.
    18661866    """
     
    18791879        return course_levels.getTerm(self.context.level).title
    18801880
    1881 class CertificateCourseManageFormPage(KOFAEditFormPage):
     1881class CertificateCourseManageFormPage(KofaEditFormPage):
    18821882    """Manage the basic properties of a `CertificateCourse` instance.
    18831883    """
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/resources.py

    r7811 r7819  
    262262    depends=[jquery])
    263263
    264 #: Register basic KOFA CSS (which is based on ``bootstrap.min-1.4.0.css``
     264#: Register basic Kofa CSS (which is based on ``bootstrap.min-1.4.0.css``
    265265#: and ``base`` as a resource.
    266266waeup_base_css = ResourceInclusion(
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/theming.py

    r7811 r7819  
    2323from zope.interface import Interface
    2424from zope.schema.interfaces import IVocabularyFactory
    25 from waeup.kofa.interfaces import SimpleKOFAVocabulary
     25from waeup.kofa.interfaces import SimpleKofaVocabulary
    2626from waeup.kofa.browser.interfaces import ITheme
    2727from waeup.kofa.browser.resources import (
     
    2929    )
    3030
    31 class KOFAThemeBase(grok.GlobalUtility):
     31class KofaThemeBase(grok.GlobalUtility):
    3232    grok.implements(ITheme)
    3333    grok.name('base waeup theme')
     
    3838        return [waeup_base_css]
    3939
    40 #class KOFAThemeRed1(grok.GlobalUtility):
     40#class KofaThemeRed1(grok.GlobalUtility):
    4141#    grok.implements(ITheme)
    4242#    grok.name('red waeup theme')
     
    4747#        return [waeuptheme_red1]
    4848
    49 #class KOFAThemeGray1(grok.GlobalUtility):
     49#class KofaThemeGray1(grok.GlobalUtility):
    5050#    grok.implements(ITheme)
    5151#    grok.name('gray waeup theme')
     
    5656#        return [waeuptheme_gray1]
    5757
    58 class KOFAThemeEmpty(grok.GlobalUtility):
     58class KofaThemeEmpty(grok.GlobalUtility):
    5959    """A theme based on jQuery only.
    6060
     
    112112        terms = [(theme.description, name)
    113113                 for name, theme in get_all_themes()]
    114         vocab = SimpleKOFAVocabulary(*terms)
     114        vocab = SimpleKofaVocabulary(*terms)
    115115        return vocab
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r7817 r7819  
    3131    ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer)
    3232from waeup.kofa.interfaces import (
    33     IKOFAUtils, IKOFAObject, IKOFAXMLExporter,
    34     IKOFAXMLImporter, IDataCenter, IUserAccount)
    35 from waeup.kofa.browser.layout import KOFAPage, default_primary_nav_template
     33    IKofaUtils, IKofaObject, IKofaXMLExporter,
     34    IKofaXMLImporter, IDataCenter, IUserAccount)
     35from waeup.kofa.browser.layout import KofaPage, default_primary_nav_template
    3636from waeup.kofa.utils.helpers import get_user_account
    3737
     
    3939
    4040grok.templatedir('templates')
    41 grok.context(IKOFAObject) # Make IKOFAObject the default context
     41grok.context(IKofaObject) # Make IKofaObject the default context
    4242
    4343class LeftSidebar(grok.ViewletManager):
     
    8585    """
    8686    grok.baseclass()
    87     grok.context(IKOFAObject)
     87    grok.context(IKofaObject)
    8888    grok.viewletmanager(ActionBar)
    8989    icon = 'actionicon_modify.png' # File must exist in static/
     
    196196
    197197class BreadCrumbs(grok.Viewlet):
    198     grok.context(IKOFAObject)
     198    grok.context(IKofaObject)
    199199    grok.viewletmanager(BreadCrumbManager)
    200200    grok.order(1)
     
    216216    """
    217217    grok.viewletmanager(LanguageManager)
    218     grok.context(IKOFAObject)
     218    grok.context(IKofaObject)
    219219    grok.require('waeup.Public')
    220220    title = u'Languages'
    221221
    222222    def render(self):
    223         preferred_languages = getUtility(IKOFAUtils).PREFERRED_LANGUAGES_DICT
     223        preferred_languages = getUtility(IKofaUtils).PREFERRED_LANGUAGES_DICT
    224224        html = u''
    225225        for key, value in sorted(
     
    257257    grok.baseclass()
    258258    grok.viewletmanager(LeftSidebar)
    259     grok.context(IKOFAObject)
     259    grok.context(IKofaObject)
    260260    grok.order(5)
    261261    grok.require('waeup.manageUniversity')
     
    316316    """
    317317    grok.viewletmanager(LeftSidebar)
    318     grok.context(IKOFAObject)
     318    grok.context(IKofaObject)
    319319    grok.view(Interface)
    320320    grok.order(2)
     
    350350    """
    351351    grok.viewletmanager(LeftSidebar)
    352     grok.context(IKOFAObject)
     352    grok.context(IKofaObject)
    353353    grok.view(Interface)
    354354    grok.order(5)
     
    520520class BrowseActionButton(ActionButton):
    521521    grok.baseclass()
    522     grok.context(IKOFAObject)
     522    grok.context(IKofaObject)
    523523    grok.template('actionbutton')
    524524    grok.viewletmanager(ActionBar)
     
    686686    target_viewname = 'datacenter'
    687687
    688 # The SubobjectLister and its viewlets below are not used in KOFA.
     688# The SubobjectLister and its viewlets below are not used in Kofa.
    689689
    690690class SubobjectLister(grok.ViewletManager):
  • main/waeup.kofa/trunk/src/waeup/kofa/catalog.py

    r7811 r7819  
    3131
    3232# not yet used
    33 class KOFAQuery(Query):
     33class KofaQuery(Query):
    3434    """A hurry.query-like query that supports also ``apply``.
    3535    """
     
    5050        return results
    5151
    52 grok.global_utility(KOFAQuery)
     52grok.global_utility(KofaQuery)
    5353
    5454# not yet used
  • main/waeup.kofa/trunk/src/waeup/kofa/catalog.txt

    r7811 r7819  
    1 :mod:`waeup.kofa.catalog` -- Cataloging support KOFA
     1:mod:`waeup.kofa.catalog` -- Cataloging support Kofa
    22****************************************************
    33
     
    55
    66Components that support cataloging and searching objects inside a
    7 KOFA site.
     7Kofa site.
    88
    99.. :doctest:
    10 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     10.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1111
    1212.. contents::
     
    1515=======
    1616
    17 :class:`KOFAQuery`
     17:class:`KofaQuery`
    1818------------------
    1919
    20 .. class:: KOFAQuery()
     20.. class:: KofaQuery()
    2121
    2222   .. attribute:: grok.implements(hurry.query.interfaces.IQuery)
     
    2525   retrival of plain ``Bree`` result sets as used inside a catalog.
    2626
    27    Like `hurry.query.query.Query` objects, `KOFAQuery` is some kind
     27   Like `hurry.query.query.Query` objects, `KofaQuery` is some kind
    2828   of a meta query or 'compound query' that can give the cataloged
    2929   objects (or their int ids) matching one or more 'subqueries'.
     
    5555------------------------------
    5656
    57 We can get a KOFAQuery object by asking for an unnamed global utility
     57We can get a KofaQuery object by asking for an unnamed global utility
    5858implementing `hurry.query.interfaces.IQuery`:
    5959
     
    6262    >>> q = getUtility(IQuery)
    6363    >>> q
    64     <waeup.kofa.catalog.KOFAQuery object at 0x...>
     64    <waeup.kofa.catalog.KofaQuery object at 0x...>
    6565
    6666This query can get 'subqueries' and delivers the objects found or
     
    101101
    102102We also setup a `zope.intid.interfaces.IIntIds` utility. This is not
    103 necessary for plain catalogs, but when we want to use KOFAQuery (or
     103necessary for plain catalogs, but when we want to use KofaQuery (or
    104104`hurry.query.query.Query` objects), as to get a unique mapping from
    105105objects (stored in ZODB) to integer numbers (stored in catalogs),
     
    204204
    205205This can be done by using the ``searchResults`` method of
    206 ``KOFAQuery``:
     206``KofaQuery``:
    207207
    208208    >>> r2 = q.searchResults(subquery1)
  • main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """KOFA data center.
     18"""Kofa data center.
    1919
    2020The waeup data center cares for management of upload data and provides
  • main/waeup.kofa/trunk/src/waeup/kofa/datacenter.txt

    r7811 r7819  
    1 KOFA Data Center
     1Kofa Data Center
    22****************
    33
    4 The KOFA data center cares for managing CSV files and importing then.
     4The Kofa data center cares for managing CSV files and importing then.
    55
    66.. :doctest:
    7 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     7.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    88
    99Creating a data center
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py

    r7811 r7819  
    2323from zope.component import getUtility
    2424from waeup.kofa.browser import (
    25     KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
     25    KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
    2626    NullValidator)
    2727from waeup.kofa.browser.breadcrumbs import Breadcrumb
     
    3232    ManageActionButton, PrimaryNavTab)
    3333from waeup.kofa.browser.layout import jsaction, action
    34 from waeup.kofa.interfaces import IKOFAObject, IKOFAUtils
     34from waeup.kofa.interfaces import IKofaObject, IKofaUtils
    3535from waeup.kofa.interfaces import MessageFactory as _
    3636from waeup.kofa.hostels.vocabularies import NOT_OCCUPIED
     
    6161    """
    6262
    63     grok.context(IKOFAObject)
     63    grok.context(IKofaObject)
    6464    grok.order(5)
    6565    grok.require('waeup.viewHostels')
     
    9696            mapping = {'a':co[1], 'b':co[2], 'c':co[3]})
    9797
    98 class HostelsContainerPage(KOFADisplayFormPage):
     98class HostelsContainerPage(KofaDisplayFormPage):
    9999    """The standard view for hostels containers.
    100100    """
     
    113113    text = _('Manage accommodation section')
    114114
    115 class HostelsContainerManagePage(KOFADisplayFormPage):
     115class HostelsContainerManagePage(KofaDisplayFormPage):
    116116    """The manage page for hostel containers.
    117117    """
     
    148148        return
    149149
    150 class HostelAddFormPage(KOFAAddFormPage):
     150class HostelAddFormPage(KofaAddFormPage):
    151151    """Add-form to add a hostel.
    152152    """
     
    175175        return
    176176
    177 class HostelDisplayFormPage(KOFADisplayFormPage):
     177class HostelDisplayFormPage(KofaDisplayFormPage):
    178178    """ Page to display hostel data
    179179    """
     
    196196    target = 'manage'
    197197
    198 class HostelManageFormPage(KOFAEditFormPage):
     198class HostelManageFormPage(KofaEditFormPage):
    199199    """ View to edit hostel data
    200200    """
     
    261261        switched = [] # for log file
    262262        switched_translated = [] # for flash message
    263         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     263        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    264264        preferred_language = self.request.cookies.get(
    265265            'kofa.language', portal_language)
     
    306306        return
    307307
    308 class BedManageFormPage(KOFAEditFormPage):
     308class BedManageFormPage(KofaEditFormPage):
    309309    """ View to edit bed data
    310310    """
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py

    r7811 r7819  
    1818from zope.interface import invariant, Invalid
    1919from zope import schema
    20 from waeup.kofa.interfaces import IKOFAObject
     20from waeup.kofa.interfaces import IKofaObject
    2121from waeup.kofa.interfaces import MessageFactory as _
    2222from waeup.kofa.hostels.vocabularies import (
    2323    bed_letters, blocks, special_handling, StudentSource)
    2424
    25 class IHostelsContainer(IKOFAObject):
     25class IHostelsContainer(IKofaObject):
    2626    """A container for all kind of hostel objects.
    2727
    2828    """
    2929
    30 class IHostel(IKOFAObject):
     30class IHostel(IKofaObject):
    3131    """A base representation of hostels.
    3232
     
    146146            raise Invalid(_('Bed categories overlap.'))
    147147
    148 class IBed(IKOFAObject):
     148class IBed(IKofaObject):
    149149    """A base representation of beds.
    150150
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py

    r7811 r7819  
    2222from zope.catalog.interfaces import ICatalog
    2323from zc.sourcefactory.contextual import BasicContextualSourceFactory
    24 from waeup.kofa.interfaces import SimpleKOFAVocabulary
     24from waeup.kofa.interfaces import SimpleKofaVocabulary
    2525from waeup.kofa.interfaces import MessageFactory as _
    2626
     
    5454        return "%s - %s" % (value, self.acco_students(context)[value])
    5555
    56 bed_letters = SimpleKOFAVocabulary(
     56bed_letters = SimpleKofaVocabulary(
    5757    (_('Bed A'),'A'),
    5858    (_('Bed B'),'B'),
     
    6666    )
    6767
    68 blocks = SimpleKOFAVocabulary(
     68blocks = SimpleKofaVocabulary(
    6969    (_('Block A'),'A'),
    7070    (_('Block B'),'B'),
     
    8484    )
    8585
    86 special_handling = SimpleKOFAVocabulary(
     86special_handling = SimpleKofaVocabulary(
    8787    (_('Regular Hostel'),'regular'),
    8888    (_('Blocked Hostel'),'blocked'),
  • main/waeup.kofa/trunk/src/waeup/kofa/image/README.txt

    r7811 r7819  
    22========================================
    33
    4 The image file widget is built on top of the :class:`KOFAImageFile` object::
    5 
    6   >>> from waeup.kofa.image import KOFAImageFile
    7   >>> file = KOFAImageFile('foo.jpg', 'mydata')
     4The image file widget is built on top of the :class:`KofaImageFile` object::
     5
     6  >>> from waeup.kofa.image import KofaImageFile
     7  >>> file = KofaImageFile('foo.jpg', 'mydata')
    88  >>> file.filename
    99  'foo.jpg'
     
    1616  'mydata'
    1717
    18 We can also create KOFAImageFile objects from file-like objects::
     18We can also create KofaImageFile objects from file-like objects::
    1919
    2020  >>> from StringIO import StringIO
     
    3636----------------
    3737
    38 The KOFAImageFile object normally stores the file data using ZODB
     38The KofaImageFile object normally stores the file data using ZODB
    3939persistence. Files can however also be stored by tramline.  If
    4040tramline is installed in Apache, the Tramline takes care of generating
     
    7373just '1') will now be created::
    7474
    75   >>> file = KOFAImageFile('foo.jpg', '1')
     75  >>> file = KofaImageFile('foo.jpg', '1')
    7676
    7777The data is now '1', referring to the real file::
     
    102102We expect the same behavior as when tramline is not installed::
    103103
    104   >>> file = KOFAImageFile('foo.jpg', 'data')
     104  >>> file = KofaImageFile('foo.jpg', 'data')
    105105  >>> f = file.file
    106106  >>> f.read()
     
    141141  Traceback (most recent call last):
    142142  ...
    143   WrongType: ('asd', <class 'waeup.kofa.image.image.KOFAImageFile'>, 'foo')
     143  WrongType: ('asd', <class 'waeup.kofa.image.image.KofaImageFile'>, 'foo')
    144144
    145145which means: `ImageFile` fields should better contain
    146 :class:`KOFAImageFile` instances.
    147 
    148 We can store normal :class:`KOFAImageFile` instances:
    149 
    150   >>> field.validate(KOFAImageFile('bar.jpg', 'data')) is None
     146:class:`KofaImageFile` instances.
     147
     148We can store normal :class:`KofaImageFile` instances:
     149
     150  >>> field.validate(KofaImageFile('bar.jpg', 'data')) is None
    151151  True
    152152
     
    173173
    174174  >>> field.validate(
    175   ...     KOFAImageFile('bar.jpg', '123456789012')) is None
    176   True
    177 
    178   >>> field.validate(
    179   ...     KOFAImageFile('bar.jpg', '12345')) is None
     175  ...     KofaImageFile('bar.jpg', '123456789012')) is None
     176  True
     177
     178  >>> field.validate(
     179  ...     KofaImageFile('bar.jpg', '12345')) is None
    180180  True
    181181
     
    183183
    184184  >>> field.validate(
    185   ...     KOFAImageFile('bar.jpg', '1234567890123'))
     185  ...     KofaImageFile('bar.jpg', '1234567890123'))
    186186  Traceback (most recent call last):
    187187  ...
     
    189189
    190190  >>> field.validate(
    191   ...     KOFAImageFile('bar.jpg', '1234'))
     191  ...     KofaImageFile('bar.jpg', '1234'))
    192192  Traceback (most recent call last):
    193193  ...
     
    198198----------------------------
    199199
    200 KOFAImageFile does not reproduce the broken unequal comparison from
     200KofaImageFile does not reproduce the broken unequal comparison from
    201201its base:
    202202
    203   >>> f1 = KOFAImageFile('bar.jpg', '123456789')
    204   >>> f2 = KOFAImageFile('bar.jpg', '123456789')
    205   >>> f3 = KOFAImageFile('baz.jpg', '1234')
     203  >>> f1 = KofaImageFile('bar.jpg', '123456789')
     204  >>> f2 = KofaImageFile('bar.jpg', '123456789')
     205  >>> f3 = KofaImageFile('baz.jpg', '1234')
    206206  >>> f1 == f2
    207207  True
  • main/waeup.kofa/trunk/src/waeup/kofa/image/__init__.py

    r7811 r7819  
    33Includings schemas, widgets and the content components.
    44"""
    5 from waeup.kofa.image.image import KOFAImageFile, createKOFAImageFile
     5from waeup.kofa.image.image import KofaImageFile, createKofaImageFile
    66
    77__all__ = [
    8     "KOFAImageFile",
    9     "createKOFAImageFile",
     8    "KofaImageFile",
     9    "createKofaImageFile",
    1010    ]
  • main/waeup.kofa/trunk/src/waeup/kofa/image/browser/tests/image.txt

    r7811 r7819  
    1212
    1313  >>> import os
    14   >>> from waeup.kofa.image import KOFAImageFile
     14  >>> from waeup.kofa.image import KofaImageFile
    1515  >>> testimage = os.path.join(os.path.dirname(__file__), 'sample.jpg')
    1616  >>> testimage2 = os.path.join(os.path.dirname(__file__), 'sample2.jpg')
    17   >>> some_file = KOFAImageFile('foo.jpg', open(testimage, 'rb').read())
     17  >>> some_file = KofaImageFile('foo.jpg', open(testimage, 'rb').read())
    1818  >>> some_file.filename
    1919  'foo.jpg'
     
    166166prepare some new file:
    167167
    168   >>> another_file = KOFAImageFile('bar.txt', 'bar contents')
     168  >>> another_file = KofaImageFile('bar.txt', 'bar contents')
    169169
    170170We happen to know, due to the implementation of
     
    200200---------------------------
    201201
    202 As :class:`waeup.kofa.image.KOFAImageFile` objects support storing
     202As :class:`waeup.kofa.image.KofaImageFile` objects support storing
    203203image data by using external 'storages', also our widgets should do
    204204so.
     
    220220  ...         contents = f.read()
    221221  ...         id_string = hashlib.md5(contents).hexdigest()
    222   ...         result = KOFAImageFile(filename, id_string)
     222  ...         result = KofaImageFile(filename, id_string)
    223223  ...         self.storage[id_string] = contents
    224224  ...         return result
     
    260260We now want to simulate, that the field contains already data,
    261261identified by some `file_id`. To do so, we first store the data in our
    262 file retrieval and then create a KOFAImageFile object with that
     262file retrieval and then create a KofaImageFile object with that
    263263file_id stored:
    264264
    265   >>> from waeup.kofa.image import createKOFAImageFile
    266   >>> image = createKOFAImageFile(
     265  >>> from waeup.kofa.image import createKofaImageFile
     266  >>> image = createKofaImageFile(
    267267  ...     'sample.jpg', open(testimage, 'rb'))
    268268  >>> file_id = image.data
     
    274274  '9feac4265077922000aa8b88748e25be'
    275275
    276 The new file was stored by our utility, as createKOFAImageFile looks
     276The new file was stored by our utility, as createKofaImageFile looks
    277277up IFileRetrieval utilities and uses them:
    278278
  • main/waeup.kofa/trunk/src/waeup/kofa/image/browser/widget.py

    r7811 r7819  
    1919"""
    2020import os
    21 from waeup.kofa.image import KOFAImageFile
     21from waeup.kofa.image import KofaImageFile
    2222from hurry.file.browser.widget import (
    2323    EncodingFileWidget, DownloadWidget, FakeFieldStorage)
     
    6262                seek(0)
    6363                return retrieval.createFile(input.filename, input)
    64             return KOFAImageFile(input.filename, data)
     64            return KofaImageFile(input.filename, data)
    6565        else:
    6666            return self.context.missing_value
     
    143143        data = file_id.decode('base64')
    144144        filename, filedata = data.split('\n', 1)
    145         return KOFAImageFile(filename, filedata)
     145        return KofaImageFile(filename, filedata)
    146146
    147147class ThumbnailWidget(DownloadWidget):
  • main/waeup.kofa/trunk/src/waeup/kofa/image/image.py

    r7811 r7819  
    2323from zope.component import getUtility
    2424from zope.interface import implements
    25 from waeup.kofa.image.interfaces import IKOFAImageFile
     25from waeup.kofa.image.interfaces import IKofaImageFile
    2626
    27 class KOFAImageFile(HurryFile):
     27class KofaImageFile(HurryFile):
    2828    """A file prepared for storing image files.
    2929
     
    3232    regular hurry files.
    3333
    34     To create a :class:`KOFAImageFile` you should use
    35     :func:`createKOFAImageFile`.
     34    To create a :class:`KofaImageFile` you should use
     35    :func:`createKofaImageFile`.
    3636    """
    37     implements(IKOFAImageFile)
     37    implements(IKofaImageFile)
    3838
    3939    def __ne__(self, other):
     
    4545            return True
    4646
    47 def createKOFAImageFile(filename, f):
     47def createKofaImageFile(filename, f):
    4848    retrieval = getUtility(IFileRetrieval)
    4949    return retrieval.createFile(filename, f)
  • main/waeup.kofa/trunk/src/waeup/kofa/image/interfaces.py

    r7811 r7819  
    2424    """
    2525
    26 class IKOFAImageFile(IHurryFile):
     26class IKofaImageFile(IHurryFile):
    2727    """Image file.
    2828    """
  • main/waeup.kofa/trunk/src/waeup/kofa/image/schema.py

    r7811 r7819  
    2323from hurry.file.schema import File
    2424from waeup.kofa.image.interfaces import IImageFile
    25 from waeup.kofa.image.image import KOFAImageFile
     25from waeup.kofa.image.image import KofaImageFile
    2626
    2727class MinMaxSize(object):
     
    8282    implements(IImageFile)
    8383
    84     _type = KOFAImageFile
     84    _type = KofaImageFile
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r7817 r7819  
    5050        encoding='utf-8', mode='rb').read()
    5151
    52 def SimpleKOFAVocabulary(*terms):
     52def SimpleKofaVocabulary(*terms):
    5353    """A well-buildt vocabulary provides terms with a value, token and
    5454       title for each term
     
    6666    return [('%s/%s' % (year,year+1), year) for year in year_range]
    6767
    68 academic_sessions_vocab = SimpleKOFAVocabulary(*academic_sessions())
    69 
    70 registration_states_vocab = SimpleKOFAVocabulary(
     68academic_sessions_vocab = SimpleKofaVocabulary(*academic_sessions())
     69
     70registration_states_vocab = SimpleKofaVocabulary(
    7171    (_('created'), CREATED),
    7272    (_('admitted'), ADMITTED),
     
    187187    """
    188188
    189 class IKOFAUtils(Interface):
     189class IKofaUtils(Interface):
    190190    """A collection of methods which are subject to customization.
    191191    """
     
    222222        """
    223223
    224 class IKOFAObject(Interface):
    225     """A KOFA object.
     224class IKofaObject(Interface):
     225    """A Kofa object.
    226226
    227227    This is merely a marker interface.
    228228    """
    229229
    230 class IUniversity(IKOFAObject):
     230class IUniversity(IKofaObject):
    231231    """Representation of a university.
    232232    """
    233233
    234234
    235 class IKOFAContainer(IKOFAObject):
    236     """A container for KOFA objects.
    237     """
    238 
    239 class IKOFAContained(IKOFAObject):
    240     """An item contained in an IKOFAContainer.
     235class IKofaContainer(IKofaObject):
     236    """A container for Kofa objects.
     237    """
     238
     239class IKofaContained(IKofaObject):
     240    """An item contained in an IKofaContainer.
    241241    """
    242242
     
    267267        """
    268268
    269 class IKOFAExporter(Interface):
     269class IKofaExporter(Interface):
    270270    """An exporter for objects.
    271271    """
     
    279279        """
    280280
    281 class IKOFAXMLExporter(Interface):
     281class IKofaXMLExporter(Interface):
    282282    """An XML exporter for objects.
    283283    """
     
    291291        """
    292292
    293 class IKOFAXMLImporter(Interface):
     293class IKofaXMLImporter(Interface):
    294294    """An XML import for objects.
    295295    """
     
    328328        """
    329329
    330 class IContactForm(IKOFAObject):
     330class IContactForm(IKofaObject):
    331331    """A contact form.
    332332    """
     
    358358        required = True,)
    359359
    360 class IKOFAPrincipalInfo(IPrincipalInfo):
    361     """Infos about principals that are users of KOFA KOFA.
     360class IKofaPrincipalInfo(IPrincipalInfo):
     361    """Infos about principals that are users of Kofa Kofa.
    362362    """
    363363    email = Attribute("The email address of a user")
     
    365365
    366366
    367 class IKOFAPrincipal(IPrincipal):
    368     """A principle for KOFA KOFA.
     367class IKofaPrincipal(IPrincipal):
     368    """A principle for Kofa Kofa.
    369369
    370370    This interface extends zope.security.interfaces.IPrincipal and
     
    382382        required=False,)
    383383
    384 class IUserAccount(IKOFAObject):
     384class IUserAccount(IKofaObject):
    385385    """A user account.
    386386    """
     
    425425
    426426
    427 class IUsersContainer(IKOFAObject):
     427class IUsersContainer(IKofaObject):
    428428    """A container for users (principals).
    429429
     
    450450        """
    451451
    452 class IConfigurationContainer(IKOFAObject):
     452class IConfigurationContainer(IKofaObject):
    453453    """A container for session configuration objects.
    454454    """
     
    462462    acronym = schema.TextLine(
    463463        title = u'Abbreviated Title of University',
    464         default = u'WAeUP.KOFA',
     464        default = u'WAeUP.Kofa',
    465465        required = True,
    466466        )
     
    516516    email_subject = schema.TextLine(
    517517        title = u'Subject of Email to Administrator',
    518         default = u'KOFA Contact',
     518        default = u'Kofa Contact',
    519519        required = False,
    520520        )
     
    539539        )
    540540
    541 class ISessionConfiguration(IKOFAObject):
     541class ISessionConfiguration(IKofaObject):
    542542    """A session configuration object.
    543543    """
     
    606606    'academic_session'].order
    607607
    608 class IDataCenter(IKOFAObject):
     608class IDataCenter(IKofaObject):
    609609    """A data center.
    610610
     
    669669        title = u'Longer description of the item found.')
    670670
    671 class IKOFAPluggable(Interface):
    672     """A component that might be plugged into a KOFA KOFA app.
     671class IKofaPluggable(Interface):
     672    """A component that might be plugged into a Kofa Kofa app.
    673673
    674674    Components implementing this interface are referred to as
     
    807807        """
    808808
    809 class IKOFAWorkflowInfo(IWorkflowInfo):
     809class IKofaWorkflowInfo(IWorkflowInfo):
    810810    """A :class:`hurry.workflow.workflow.WorkflowInfo` with additional
    811811       methods for convenience.
     
    820820class ISiteLoggers(Interface):
    821821
    822     loggers = Attribute("A list or generator of registered KOFALoggers")
     822    loggers = Attribute("A list or generator of registered KofaLoggers")
    823823
    824824    def register(name, filename=None, site=None, **options):
     
    841841
    842842    def __init__(name, filename=None, site=None, **options):
    843         """Create a KOFA logger instance.
     843        """Create a Kofa logger instance.
    844844        """
    845845
     
    973973
    974974        Returns a tuple ``(raw_file, path, file_like_obj)`` where the
    975         ``file_like_obj`` should be a HurryFile, a KOFAImageFile or
     975        ``file_like_obj`` should be a HurryFile, a KofaImageFile or
    976976        similar. ``raw_file`` is the (maybe changed) input file and
    977977        ``path`` the relative internal path to store the file at.
  • main/waeup.kofa/trunk/src/waeup/kofa/language.py

    r7811 r7819  
    2222from zope.i18n.interfaces import IUserPreferredLanguages
    2323from waeup.kofa.configuration import ConfigurationContainer
    24 from waeup.kofa.interfaces import IKOFAUtils
     24from waeup.kofa.interfaces import IKofaUtils
    2525
    26 class KOFALanguage(grokcore.component.Adapter):
     26class KofaLanguage(grokcore.component.Adapter):
    2727    """Set preferred languages"""
    2828    grokcore.component.context(IBrowserRequest)
     
    3030
    3131    def getPreferredLanguages(self):
    32         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     32        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    3333
    3434        # This an adapter for the request, so self.context is the request.
  • main/waeup.kofa/trunk/src/waeup/kofa/meta.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Grokkers for KOFA components.
     18"""Grokkers for Kofa components.
    1919
    2020Stuff in here is mainly taken from grok.meta, with some modifications
     
    6161            return False
    6262
    63         subscriber = KOFAIndexesUpgradeSubscriber(
     63        subscriber = KofaIndexesUpgradeSubscriber(
    6464            catalog_name, indexes, context, module_info)
    6565        subscribed = (site, IObjectUpgradeEvent)
     
    7272
    7373
    74 class KOFAIndexesUpgradeSubscriber(IndexesSetupSubscriber):
     74class KofaIndexesUpgradeSubscriber(IndexesSetupSubscriber):
    7575    """Helper that sets up indexes when their Grok site is upgraded.
    7676
  • main/waeup.kofa/trunk/src/waeup/kofa/objecthistory.py

    r7811 r7819  
    2222from zope.i18n import translate
    2323from zope.annotation.interfaces import IAnnotations
    24 from waeup.kofa.interfaces import IObjectHistory, IKOFAObject, IKOFAUtils
     24from waeup.kofa.interfaces import IObjectHistory, IKofaObject, IKofaUtils
    2525from waeup.kofa.utils.helpers import get_current_principal
    2626
     
    3030    """A history for objects.
    3131
    32     For any object implementing `IKOFAObject` which is annotatable,
     32    For any object implementing `IKofaObject` which is annotatable,
    3333    we provide histories. A history for such an object can be obtained
    3434    by adapting it to `IObjectHistory`.
    3535    """
    36     grok.context(IKOFAObject)
     36    grok.context(IKofaObject)
    3737    grok.implements(IObjectHistory)
    3838
     
    6868        else:
    6969            user = user.title
    70         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     70        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    7171        by = 'by'
    7272        if portal_language != 'en':
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py

    r7811 r7819  
    1818from zope.interface import Attribute
    1919from zope import schema
    20 from waeup.kofa.interfaces import IKOFAObject, SimpleKOFAVocabulary
     20from waeup.kofa.interfaces import IKofaObject, SimpleKofaVocabulary
    2121from waeup.kofa.interfaces import MessageFactory as _
    2222
    23 payment_states = SimpleKOFAVocabulary(
     23payment_states = SimpleKofaVocabulary(
    2424    (_('Not yet paid'),'unpaid'),
    2525    (_('Paid'),'paid'),
     
    2727    )
    2828
    29 payment_categories = SimpleKOFAVocabulary(
     29payment_categories = SimpleKofaVocabulary(
    3030    (_('School Fee'),'schoolfee'),
    3131    (_('Clearance'),'clearance'),
     
    3737    )
    3838
    39 class IPaymentsContainer(IKOFAObject):
     39class IPaymentsContainer(IKofaObject):
    4040    """A container for all kind of payment objects.
    4141
    4242    """
    4343
    44 class IPayment(IKOFAObject):
     44class IPayment(IKofaObject):
    4545    """A base representation of payments.
    4646
  • main/waeup.kofa/trunk/src/waeup/kofa/permissions.py

    r7811 r7819  
    168168
    169169def get_waeup_roles(also_local=False):
    170     """Get all KOFA roles.
    171 
    172     KOFA roles are ordinary roles whose id by convention starts with
     170    """Get all Kofa roles.
     171
     172    Kofa roles are ordinary roles whose id by convention starts with
    173173    a ``waeup.`` prefix.
    174174
    175175    If `also_local` is ``True`` (``False`` by default), also local
    176     roles are returned. Local KOFA roles are such whose id starts
     176    roles are returned. Local Kofa roles are such whose id starts
    177177    with ``waeup.local.`` prefix (this is also a convention).
    178178
     
    181181    for name, item in get_all_roles():
    182182        if not name.startswith('waeup.'):
    183             # Ignore non-KOFA roles...
     183            # Ignore non-Kofa roles...
    184184            continue
    185185        if not also_local and name.startswith('waeup.local.'):
     
    189189
    190190def get_waeup_role_names():
    191     """Get the ids of all KOFA roles.
    192 
    193     See :func:`get_waeup_roles` for what a 'KOFARole' is.
    194 
    195     This function returns a sorted list of KOFA role names.
     191    """Get the ids of all Kofa roles.
     192
     193    See :func:`get_waeup_roles` for what a 'KofaRole' is.
     194
     195    This function returns a sorted list of Kofa role names.
    196196    """
    197197    return sorted([x.id for x in get_waeup_roles()])
  • main/waeup.kofa/trunk/src/waeup/kofa/permissions.txt

    r7811 r7819  
    1 KOFA permissions and roles
     1Kofa permissions and roles
    22**************************
    33
    4 Permissions and roles used in a KOFA portal.
     4Permissions and roles used in a Kofa portal.
    55
    66.. :doctest:
    7 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     7.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    88
    99Convenience functions
     
    1616---------------------
    1717
    18 Gives us all roles defined in KOFA. We get tuples of
     18Gives us all roles defined in Kofa. We get tuples of
    1919kind
    2020
     
    3434-----------------------
    3535
    36 Gives us all roles, except the KOFA specific roles. We can get a list
     36Gives us all roles, except the Kofa specific roles. We can get a list
    3737with or without local roles:
    3838
     
    4848----------------------------
    4949
    50 We can get all role names defined in KOFA (except 'local'
     50We can get all role names defined in Kofa (except 'local'
    5151roles that are meant not to be assigned globally):
    5252
  • main/waeup.kofa/trunk/src/waeup/kofa/schoolgrades.py

    r7811 r7819  
    2525from waeup.kofa.interfaces import IResultEntry, IResultEntryField
    2626from waeup.kofa.widgets.objectwidget import (
    27     KOFAObjectWidget, KOFAObjectDisplayWidget
     27    KofaObjectWidget, KofaObjectDisplayWidget
    2828    )
    2929
     
    5252        return
    5353
    54 # register KOFAObjectWidgets as default widgets for IResultEntryFields
     54# register KofaObjectWidgets as default widgets for IResultEntryFields
    5555@grok.adapter(IResultEntryField, IBrowserRequest)
    5656@grok.implementer(IInputWidget)
    5757def result_entry_input_widget(obj, req):
    58     return KOFAObjectWidget(obj, req, ResultEntry)
     58    return KofaObjectWidget(obj, req, ResultEntry)
    5959
    6060# register a display widget for IResultEntryFields
     
    6262@grok.implementer(IDisplayWidget)
    6363def result_entry_display_widget(obj, req):
    64     return KOFAObjectDisplayWidget(obj, req, ResultEntry)
     64    return KofaObjectDisplayWidget(obj, req, ResultEntry)
  • main/waeup.kofa/trunk/src/waeup/kofa/smtp.py

    r7811 r7819  
    1717##
    1818"""
    19 Email (SMTP) services for KOFA.
     19Email (SMTP) services for Kofa.
    2020
    2121Note About Encodings
  • main/waeup.kofa/trunk/src/waeup/kofa/students/authentication.py

    r7811 r7819  
    2929from zope.session.interfaces import ISession
    3030from waeup.kofa.authentication import (
    31     KOFAPrincipalInfo, get_principal_role_manager)
     31    KofaPrincipalInfo, get_principal_role_manager)
    3232from waeup.kofa.interfaces import (
    3333    IAuthPluginUtility, IUserAccount, IPasswordValidator)
     
    135135        if not account.checkPassword(credentials['password']):
    136136            return None
    137         return KOFAPrincipalInfo(id=account.name,
     137        return KofaPrincipalInfo(id=account.name,
    138138                             title=account.title,
    139139                             description=account.description,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r7811 r7819  
    3333from waeup.kofa.accesscodes.workflow import USED
    3434from waeup.kofa.browser import (
    35     KOFAPage, KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
    36     ContactAdminForm, KOFAForm)
     35    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
     36    ContactAdminForm, KofaForm)
    3737from waeup.kofa.browser.interfaces import ICaptchaManager
    3838from waeup.kofa.browser.breadcrumbs import Breadcrumb
     
    4040from waeup.kofa.browser.layout import jsaction, action, UtilityView
    4141from waeup.kofa.interfaces import (
    42     IKOFAObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm,
    43     IKOFAUtils, IUniversity)
     42    IKofaObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm,
     43    IKofaUtils, IUniversity)
    4444from waeup.kofa.interfaces import MessageFactory as _
    4545from waeup.kofa.widgets.datewidget import (
     
    155155    @property
    156156    def title(self):
    157         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     157        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    158158        # There is no request attribute, thus we can only translate
    159159        # to the default (portal) language
     
    161161            target_language=portal_language)
    162162
    163 class StudentsContainerPage(KOFAPage):
     163class StudentsContainerPage(KofaPage):
    164164    """The standard view for student containers.
    165165    """
     
    194194        return
    195195
    196 class StudentsContainerManagePage(KOFAPage):
     196class StudentsContainerManagePage(KofaPage):
    197197    """The manage page for student containers.
    198198    """
     
    245245        return
    246246
    247 class StudentAddFormPage(KOFAAddFormPage):
     247class StudentAddFormPage(KofaAddFormPage):
    248248    """Add-form to add a student.
    249249    """
     
    265265        return
    266266
    267 class StudentBaseDisplayFormPage(KOFADisplayFormPage):
     267class StudentBaseDisplayFormPage(KofaDisplayFormPage):
    268268    """ Page to display student base data
    269269    """
     
    310310        usertype = getattr(self.request.principal,
    311311                           'user_type', 'system').title()
    312         kofa_utils = getUtility(IKOFAUtils)
     312        kofa_utils = getUtility(IKofaUtils)
    313313        success = kofa_utils.sendContactForm(
    314314                self.request.principal.title,email,
     
    323323        return
    324324
    325 class StudentBaseManageFormPage(KOFAEditFormPage):
     325class StudentBaseManageFormPage(KofaEditFormPage):
    326326    """ View to manage student base data
    327327    """
     
    388388        return
    389389
    390 class StudentClearanceDisplayFormPage(KOFADisplayFormPage):
     390class StudentClearanceDisplayFormPage(KofaDisplayFormPage):
    391391    """ Page to display student clearance data
    392392    """
     
    415415    @property
    416416    def title(self):
    417         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     417        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    418418        return translate(_('Clearance Data'), 'waeup.kofa',
    419419            target_language=portal_language)
     
    421421    @property
    422422    def label(self):
    423         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     423        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    424424        return translate(_('Clearance Slip of '),
    425425            'waeup.kofa', target_language=portal_language) \
     
    434434            self.context.getStudent(), studentview)
    435435
    436 class StudentClearanceManageFormPage(KOFAEditFormPage):
     436class StudentClearanceManageFormPage(KofaEditFormPage):
    437437    """ Page to edit student clearance data
    438438    """
     
    508508        return
    509509
    510 class StudentPersonalDisplayFormPage(KOFADisplayFormPage):
     510class StudentPersonalDisplayFormPage(KofaDisplayFormPage):
    511511    """ Page to display student personal data
    512512    """
     
    523523            mapping = {'a':self.context.display_fullname})
    524524
    525 class StudentPersonalManageFormPage(KOFAEditFormPage):
     525class StudentPersonalManageFormPage(KofaEditFormPage):
    526526    """ Page to edit student clearance data
    527527    """
     
    538538        return
    539539
    540 class StudyCourseDisplayFormPage(KOFADisplayFormPage):
     540class StudyCourseDisplayFormPage(KofaDisplayFormPage):
    541541    """ Page to display the student study course data
    542542    """
     
    556556    def current_mode(self):
    557557        if self.context.certificate is not None:
    558             studymodes_dict = getUtility(IKOFAUtils).getStudyModesDict()
     558            studymodes_dict = getUtility(IKofaUtils).getStudyModesDict()
    559559            return studymodes_dict[self.context.certificate.study_mode]
    560560        return
     
    572572        return
    573573
    574 class StudyCourseManageFormPage(KOFAEditFormPage):
     574class StudyCourseManageFormPage(KofaEditFormPage):
    575575    """ Page to edit the student study course data
    576576    """
     
    645645        return
    646646
    647 class StudyLevelDisplayFormPage(KOFADisplayFormPage):
     647class StudyLevelDisplayFormPage(KofaDisplayFormPage):
    648648    """ Page to display student study levels
    649649    """
     
    662662    @property
    663663    def label(self):
    664         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     664        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    665665        lang = self.request.cookies.get('kofa.language', portal_language)
    666666        level_title = translate(self.context.level_title, 'waeup.kofa',
     
    688688    @property
    689689    def title(self):
    690         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     690        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    691691        return translate(_('Level Data'), 'waeup.kofa',
    692692            target_language=portal_language)
     
    694694    @property
    695695    def content_title(self):
    696         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     696        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    697697        return translate(_('Course List'), 'waeup.kofa',
    698698            target_language=portal_language)
     
    700700    @property
    701701    def label(self):
    702         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     702        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    703703        lang = self.request.cookies.get('kofa.language', portal_language)
    704704        level_title = translate(self.context.level_title, 'waeup.kofa',
     
    709709
    710710    def render(self):
    711         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     711        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    712712        Sem = translate(_('Sem.'), 'waeup.kofa', target_language=portal_language)
    713713        Code = translate(_('Code'), 'waeup.kofa', target_language=portal_language)
     
    735735            tabledata=tabledata)
    736736
    737 class StudyLevelManageFormPage(KOFAEditFormPage):
     737class StudyLevelManageFormPage(KofaEditFormPage):
    738738    """ Page to edit the student study level data
    739739    """
     
    762762    @property
    763763    def label(self):
    764         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     764        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    765765        lang = self.request.cookies.get('kofa.language', portal_language)
    766766        level_title = translate(self.context.level_title, 'waeup.kofa',
     
    853853        return
    854854
    855 class CourseTicketAddFormPage(KOFAAddFormPage):
     855class CourseTicketAddFormPage(KofaAddFormPage):
    856856    """Add a course ticket.
    857857    """
     
    890890        self.redirect(self.url(self.context))
    891891
    892 class CourseTicketDisplayFormPage(KOFADisplayFormPage):
     892class CourseTicketDisplayFormPage(KofaDisplayFormPage):
    893893    """ Page to display course tickets
    894894    """
     
    906906            'b':self.context.code})
    907907
    908 class CourseTicketManageFormPage(KOFAEditFormPage):
     908class CourseTicketManageFormPage(KofaEditFormPage):
    909909    """ Page to manage course tickets
    910910    """
     
    925925        return
    926926
    927 class PaymentsManageFormPage(KOFAEditFormPage):
     927class PaymentsManageFormPage(KofaEditFormPage):
    928928    """ Page to manage the student payments
    929929
     
    982982        self.redirect(self.url(self.context, '@@addop'))
    983983
    984 class OnlinePaymentAddFormPage(KOFAAddFormPage):
     984class OnlinePaymentAddFormPage(KofaAddFormPage):
    985985    """ Page to add an online payment ticket
    986986    """
     
    10391039        return
    10401040
    1041 class OnlinePaymentDisplayFormPage(KOFADisplayFormPage):
     1041class OnlinePaymentDisplayFormPage(KofaDisplayFormPage):
    10421042    """ Page to view an online payment ticket
    10431043    """
     
    11381138
    11391139
    1140 class AccommodationManageFormPage(KOFAEditFormPage):
     1140class AccommodationManageFormPage(KofaEditFormPage):
    11411141    """ Page to manage bed tickets.
    11421142
     
    11951195        return self.actions
    11961196
    1197 class BedTicketAddPage(KOFAPage):
     1197class BedTicketAddPage(KofaPage):
    11981198    """ Page to add an online payment ticket
    11991199    """
     
    12871287            'c':room_nr, 'd':bed_nr,
    12881288            'e':bed.bed_type})
    1289         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     1289        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    12901290        bedticket.bed_coordinates = translate(
    12911291            bc, 'waeup.kofa',target_language=portal_language)
     
    12971297        return
    12981298
    1299 class BedTicketDisplayFormPage(KOFADisplayFormPage):
     1299class BedTicketDisplayFormPage(KofaDisplayFormPage):
    13001300    """ Page to display bed tickets
    13011301    """
     
    13251325    @property
    13261326    def title(self):
    1327         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     1327        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    13281328        return translate(_('Bed Allocation Data'), 'waeup.kofa',
    13291329            target_language=portal_language)
     
    13311331    @property
    13321332    def label(self):
    1333         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     1333        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    13341334        return translate(_('Bed Allocation: '),
    13351335            'waeup.kofa', target_language=portal_language) \
     
    14051405            'c':room_nr, 'd':bed_nr,
    14061406            'e':new_bed.bed_type})
    1407         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     1407        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    14081408        self.context.bed_coordinates = translate(
    14091409            bc, 'waeup.kofa',target_language=portal_language)
     
    14161416        return
    14171417
    1418 class StudentHistoryPage(KOFAPage):
     1418class StudentHistoryPage(KofaPage):
    14191419    """ Page to display student clearance data
    14201420    """
     
    14311431# Pages for students only
    14321432
    1433 class StudentBaseEditFormPage(KOFAEditFormPage):
     1433class StudentBaseEditFormPage(KofaEditFormPage):
    14341434    """ View to edit student base data
    14351435    """
     
    14471447        return
    14481448
    1449 class StudentChangePasswordPage(KOFAEditFormPage):
     1449class StudentChangePasswordPage(KofaEditFormPage):
    14501450    """ View to manage student base data
    14511451    """
     
    14731473        return
    14741474
    1475 class StudentFilesUploadPage(KOFAPage):
     1475class StudentFilesUploadPage(KofaPage):
    14761476    """ View to upload files by student
    14771477    """
     
    14901490        return
    14911491
    1492 class StartClearancePage(KOFAPage):
     1492class StartClearancePage(KofaPage):
    14931493    grok.context(IStudent)
    14941494    grok.name('start_clearance')
     
    15931593        return
    15941594
    1595 class RequestClearancePage(KOFAPage):
     1595class RequestClearancePage(KofaPage):
    15961596    grok.context(IStudent)
    15971597    grok.name('request_clearance')
     
    16241624        return
    16251625
    1626 class StartCourseRegistrationPage(KOFAPage):
     1626class StartCourseRegistrationPage(KofaPage):
    16271627    grok.context(IStudentStudyCourse)
    16281628    grok.name('start_course_registration')
     
    16731673        return
    16741674
    1675 class AddStudyLevelFormPage(KOFAEditFormPage):
     1675class AddStudyLevelFormPage(KofaEditFormPage):
    16761676    """ Page for students to add current study levels
    16771677    """
     
    17101710        return
    17111711
    1712 class StudyLevelEditFormPage(KOFAEditFormPage):
     1712class StudyLevelEditFormPage(KofaEditFormPage):
    17131713    """ Page to edit the student study level data by students
    17141714    """
     
    17321732    @property
    17331733    def label(self):
    1734         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     1734        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    17351735        lang = self.request.cookies.get('kofa.language', portal_language)
    17361736        level_title = translate(self.context.level_title, 'waeup.kofa',
     
    18161816        return
    18171817
    1818 class ChangePasswordRequestPage(KOFAForm):
     1818class ChangePasswordRequestPage(KofaForm):
    18191819    """Captcha'd page for students to request a password change.
    18201820    """
     
    18511851        student = list(results)[0]
    18521852        # Change password
    1853         kofa_utils = getUtility(IKOFAUtils)
     1853        kofa_utils = getUtility(IKofaUtils)
    18541854        pwd = kofa_utils.genPassword()
    18551855        IUserAccount(student).setPassword(pwd)
     
    18661866        return
    18671867
    1868 class SetPasswordPage(KOFAPage):
    1869     grok.context(IKOFAObject)
     1868class SetPasswordPage(KofaPage):
     1869    grok.context(IKofaObject)
    18701870    grok.name('setpassword')
    18711871    grok.require('waeup.Anonymous')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r7811 r7819  
    2222from zc.sourcefactory.contextual import BasicContextualSourceFactory
    2323from waeup.kofa.interfaces import (
    24     IKOFAObject, academic_sessions_vocab, validate_email, IKOFAUtils)
     24    IKofaObject, academic_sessions_vocab, validate_email, IKofaUtils)
    2525from waeup.kofa.interfaces import MessageFactory as _
    2626from waeup.kofa.schema import TextLineChoice
     
    7878        """
    7979
    80 class IStudentsContainer(IKOFAObject):
     80class IStudentsContainer(IKofaObject):
    8181    """A students container contains university students.
    8282
     
    117117        """
    118118
    119 class IStudentNavigation(IKOFAObject):
     119class IStudentNavigation(IKofaObject):
    120120    """Interface needed for student navigation.
    121121
     
    126126        """
    127127
    128 class IStudentBase(IKOFAObject):
     128class IStudentBase(IKofaObject):
    129129    """Representation of student base data.
    130130
     
    206206        )
    207207
    208 class IStudentClearance(IKOFAObject):
     208class IStudentClearance(IKofaObject):
    209209    """Representation of student clearance data.
    210210
     
    234234        )
    235235
    236 class IStudentPersonal(IKOFAObject):
     236class IStudentPersonal(IKofaObject):
    237237    """Representation of student personal data.
    238238
     
    268268        )
    269269
    270 class IStudentStudyCourse(IKOFAObject):
     270class IStudentStudyCourse(IKofaObject):
    271271    """A container for student study levels.
    272272
     
    326326        )
    327327
    328 class IStudentStudyLevel(IKOFAObject):
     328class IStudentStudyLevel(IKofaObject):
    329329    """A container for course tickets.
    330330
     
    348348        )
    349349
    350 class ICourseTicket(IKOFAObject):
     350class ICourseTicket(IKofaObject):
    351351    """A course ticket.
    352352
     
    406406        )
    407407
    408 class IStudentAccommodation(IKOFAObject):
     408class IStudentAccommodation(IKofaObject):
    409409    """A container for student accommodation objects.
    410410
    411411    """
    412412
    413 class IBedTicket(IKOFAObject):
     413class IBedTicket(IKofaObject):
    414414    """A ticket for accommodation booking.
    415415
     
    475475    'p_item'].order
    476476
    477 class IStudentChangePassword(IKOFAObject):
     477class IStudentChangePassword(IKofaObject):
    478478    """Interface needed for change pasword page.
    479479
  • main/waeup.kofa/trunk/src/waeup/kofa/students/student.py

    r7811 r7819  
    2828from waeup.kofa.interfaces import (
    2929    IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler,
    30     IKOFAUtils, CLEARANCE, registration_states_vocab)
    31 from waeup.kofa.image import KOFAImageFile
     30    IKofaUtils, CLEARANCE, registration_states_vocab)
     31from waeup.kofa.image import KofaImageFile
    3232from waeup.kofa.imagestorage import DefaultFileStoreHandler
    3333from waeup.kofa.students.interfaces import IStudent, IStudentNavigation
     
    6363    def display_fullname(self):
    6464        middlename = getattr(self, 'middlename', None)
    65         kofa_utils = getUtility(IKOFAUtils)
     65        kofa_utils = getUtility(IKofaUtils)
    6666        return kofa_utils.fullname(self.firstname, self.lastname, middlename)
    6767
     
    284284            StudentFileStoreHandler, self).createFile(
    285285            store, root,  filename, file_id, file)
    286         return file, path, KOFAImageFile(
     286        return file, path, KofaImageFile(
    287287            file_obj.filename, file_obj.data)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r7811 r7819  
    3535from zope.component import getUtility
    3636from zope.formlib.form import setUpEditWidgets
    37 from waeup.kofa.interfaces import IExtFileStore, IKOFAUtils
     37from waeup.kofa.interfaces import IExtFileStore, IKofaUtils
    3838from waeup.kofa.interfaces import MessageFactory as _
    3939from waeup.kofa.students.interfaces import IStudentsUtils
     
    113113    data_left.append([doc_img])
    114114    #data.append([Spacer(1, 12)])
    115     portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     115    portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    116116    for widget in studentview.widgets:
    117117        if widget.name == 'form.adm_code':
     
    164164      story = []
    165165      frame_footer = Frame(1*cm,0,width-(2*cm),1*cm)
    166       portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     166      portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    167167      right_text = translate(_('<font size=10>${a} Page ${b} of ${c}</font>',
    168168          mapping = {'a':text, 'b':pdf.getPageNumber(), 'c':number_of_pages}),
     
    256256        pdf.setAuthor('%s (%s)' % (view.request.principal.title,
    257257            view.request.principal.id))
    258         pdf.setCreator('WAeUP KOFA')
     258        pdf.setCreator('WAeUP Kofa')
    259259        width, height = A4
    260260        footer_text = view.label
     
    275275        frame_body = Frame(1*cm,1*cm,width-(2*cm),height-(3.5*cm))
    276276        story.append(Paragraph(view.label, style["Heading2"]))
    277         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     277        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    278278        if student is not None:
    279279            #story.append(Spacer(1, 12))
     
    288288        set_up_widgets(view)
    289289        data = []
    290         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     290        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    291291        for widget in view.widgets:
    292292            f_label = '<font size=12>%s</font>:' % translate(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py

    r7811 r7819  
    2222from zope.i18n import translate
    2323from waeup.kofa.interfaces import (
    24     IKOFAObject, IExtFileStore, IFileStoreNameChooser, IKOFAUtils)
     24    IKofaObject, IExtFileStore, IFileStoreNameChooser, IKofaUtils)
    2525from waeup.kofa.interfaces import MessageFactory as _
    2626from waeup.kofa.utils.helpers import string_from_bytes, file_size
     
    4848from waeup.kofa.interfaces import MessageFactory as _
    4949
    50 grok.context(IKOFAObject) # Make IKOFAObject the default context
     50grok.context(IKofaObject) # Make IKofaObject the default context
    5151grok.templatedir('browser_templates')
    5252
     
    6363    grok.baseclass()
    6464    grok.viewletmanager(StudentManageSidebar)
    65     grok.context(IKOFAObject)
     65    grok.context(IKofaObject)
    6666    grok.view(Interface)
    6767    grok.order(5)
     
    7373    def render(self):
    7474        url = self.view.url(self.context.getStudent(), self.link)
    75         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     75        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    7676        lang = self.request.cookies.get('kofa.language', portal_language)
    7777        text = translate(self.text, 'waeup.kofa',
     
    465465    """
    466466
    467     grok.context(IKOFAObject)
     467    grok.context(IKofaObject)
    468468    grok.order(4)
    469469    grok.require('waeup.viewStudentsTab')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/vocabularies.py

    r7811 r7819  
    2525from zc.sourcefactory.basic import BasicSourceFactory
    2626from zc.sourcefactory.contextual import BasicContextualSourceFactory
    27 from waeup.kofa.interfaces import SimpleKOFAVocabulary
     27from waeup.kofa.interfaces import SimpleKofaVocabulary
    2828from waeup.kofa.interfaces import MessageFactory as _
    2929from waeup.kofa.students.lgas import LGAS
     
    3131from waeup.kofa.university.vocabularies import course_levels
    3232
    33 lgas_vocab = SimpleKOFAVocabulary(
     33lgas_vocab = SimpleKofaVocabulary(
    3434    *sorted([(x[1],x[0]) for x in LGAS]))
    3535
    36 nats_vocab = SimpleKOFAVocabulary(
     36nats_vocab = SimpleKofaVocabulary(
    3737    *sorted([(x[1],x[0]) for x in NATS]))
    3838
  • main/waeup.kofa/trunk/src/waeup/kofa/students/workflow.py

    r7811 r7819  
    66from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
    77from waeup.kofa.interfaces import (
    8     IObjectHistory, IKOFAWorkflowInfo, IKOFAUtils,
     8    IObjectHistory, IKofaWorkflowInfo, IKofaUtils,
    99    CREATED, ADMITTED, CLEARANCE, REQUESTED, CLEARED, PAID, RETURNING,
    1010    REGISTERED, VALIDATED)
    1111from waeup.kofa.interfaces import MessageFactory as _
    12 from waeup.kofa.workflow import KOFAWorkflow, KOFAWorkflowInfo
     12from waeup.kofa.workflow import KofaWorkflow, KofaWorkflowInfo
    1313from waeup.kofa.students.interfaces import IStudent, IStudentsUtils
    1414
     
    156156UNLOCK_CLEARANCE_TRANS = ('reset3', 'reset4', 'start_clearance')
    157157
    158 registration_workflow = KOFAWorkflow(REGISTRATION_TRANSITIONS)
     158registration_workflow = KofaWorkflow(REGISTRATION_TRANSITIONS)
    159159
    160160class RegistrationWorkflowState(WorkflowState, grok.Adapter):
     
    167167    state_id = 'wf.registration.id'
    168168
    169 class RegistrationWorkflowInfo(KOFAWorkflowInfo, grok.Adapter):
     169class RegistrationWorkflowInfo(KofaWorkflowInfo, grok.Adapter):
    170170    """Adapter to adapt Student objects to workflow info objects.
    171171    """
    172172    grok.context(IStudent)
    173     grok.provides(IKOFAWorkflowInfo)
     173    grok.provides(IKofaWorkflowInfo)
    174174
    175175    def __init__(self, context):
  • main/waeup.kofa/trunk/src/waeup/kofa/testing.py

    r7817 r7819  
    163163         If you use the Zope testrunner (from :mod:`zope.testing`)
    164164         then you have to use appropriate layers like the
    165          :class:`waeup.kofa.testing.KOFAUnitTestLayer`.
     165         :class:`waeup.kofa.testing.KofaUnitTestLayer`.
    166166
    167167    Usage with :mod:`zope.testing` testrunners
     
    172172    like the one defined in this module.
    173173
    174     .. seealso:: :class:`waeup.kofa.testing.KOFAUnitTestLayer`
     174    .. seealso:: :class:`waeup.kofa.testing.KofaUnitTestLayer`
    175175
    176176    """
     
    214214    return
    215215
    216 class KOFAUnitTestLayer(object):
     216class KofaUnitTestLayer(object):
    217217    """A layer for tests that groks `waeup.kofa`.
    218218
     
    237237
    238238      import unittest
    239       from waeup.kofa.testing import KOFAUnitTestLayer
     239      from waeup.kofa.testing import KofaUnitTestLayer
    240240
    241241      class MyTestCase(unittest.TestCase):
    242242
    243           layer = KOFAUnitTestLayer
     243          layer = KofaUnitTestLayer
    244244
    245245          # per-test setups and real tests go here...
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_authentication.py

    r7811 r7819  
    2424from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
    2525from waeup.kofa.authentication import (
    26     UserAuthenticatorPlugin, Account, KOFAPrincipalInfo,
     26    UserAuthenticatorPlugin, Account, KofaPrincipalInfo,
    2727    get_principal_role_manager)
    2828
     
    6464        result2 = plugin.authenticateCredentials(
    6565            dict(login='bob', password='nonsense'))
    66         self.assertTrue(isinstance(result1, KOFAPrincipalInfo))
     66        self.assertTrue(isinstance(result1, KofaPrincipalInfo))
    6767        self.assertTrue(result2 is None)
    6868        return
     
    7373        result1 = plugin.principalInfo('bob')
    7474        result2 = plugin.principalInfo('manfred')
    75         self.assertTrue(isinstance(result1, KOFAPrincipalInfo))
     75        self.assertTrue(isinstance(result1, KofaPrincipalInfo))
    7676        self.assertTrue(result2 is None)
    7777        return
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_interfaces.py

    r7811 r7819  
    4848        # Register a role not visible to waeup portal as its name does
    4949        # not start with 'waeup.'
    50         class NonKOFARole(grok.Role):
     50        class NonKofaRole(grok.Role):
    5151            grok.name('nonwaeup.testrole')
    5252            grok.title('Role not suitable for waeup')
    5353            grok.permissions('waeup.Public')
    5454        grok.testing.grok_component('SomeRole', SomeRole)
    55         grok.testing.grok_component('NonKOFARole', NonKOFARole)
     55        grok.testing.grok_component('NonKofaRole', NonKofaRole)
    5656        return
    5757
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_objecthistory.py

    r7811 r7819  
    2626from zope.security.testing import Principal, Participation
    2727from waeup.kofa.app import University
    28 from waeup.kofa.interfaces import IObjectHistory, IKOFAObject
     28from waeup.kofa.interfaces import IObjectHistory, IKofaObject
    2929from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
    3030from waeup.kofa.objecthistory import ObjectHistory
    3131
    3232class SampleObject(grok.Model):
    33     grok.implements(IKOFAObject)
     33    grok.implements(IKofaObject)
    3434    pass
    3535
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_smtp.py

    r7811 r7819  
    328328            'test program', 'no-reply@waeup.org',
    329329            'test mail receiver', EXTERNAL_MAIL_RECEIVER,
    330             'Test Mail from WAeUP KOFA',
     330            'Test Mail from WAeUP Kofa',
    331331            'Hi from test mailer!\n\nRegards,\nTest Programme\n'
    332332            )
     
    345345            'test program', 'no-reply@waeup.org',
    346346            'test mail receiver', EXTERNAL_MAIL_RECEIVER,
    347             'Test Mail from WAeUP KOFA',
     347            'Test Mail from WAeUP Kofa',
    348348            'Hi from test mailer!\n\nRegards,\nTest Programme\n'
    349349            )
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """KOFA certificates
     18"""Kofa certificates
    1919"""
    2020import grok
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.txt

    r7811 r7819  
    1 :mod:`waeup.kofa.university.certificate` -- Certificates for KOFA
     1:mod:`waeup.kofa.university.certificate` -- Certificates for Kofa
    22******************************************************************
    33
     
    77
    88.. :doctest:
    9 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificatescontainer.txt

    r7811 r7819  
    77
    88.. :doctest:
    9 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.txt

    r7811 r7819  
    77
    88.. :doctest:
    9 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111Content Classes (models and containers)
  • main/waeup.kofa/trunk/src/waeup/kofa/university/coursescontainer.txt

    r7811 r7819  
    77
    88.. :doctest:
    9 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111
  • main/waeup.kofa/trunk/src/waeup/kofa/university/department.py

    r7811 r7819  
    2424from waeup.kofa.university.coursescontainer import CoursesContainer
    2525from waeup.kofa.university.certificatescontainer import CertificatesContainer
    26 from waeup.kofa.interfaces import IKOFAUtils
     26from waeup.kofa.interfaces import IKofaUtils
    2727from waeup.kofa.university.interfaces import IDepartment, IDepartmentAdd
    2828
     
    7373
    7474    def longtitle(self):
    75         insttypes_dict = getUtility(IKOFAUtils).getInstTypeDict()
     75        insttypes_dict = getUtility(IKofaUtils).getInstTypeDict()
    7676        return "%s %s (%s)" % (
    7777            insttypes_dict[self.title_prefix],
  • main/waeup.kofa/trunk/src/waeup/kofa/university/department.txt

    r7811 r7819  
    77
    88.. :doctest:
    9 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111Content Classes (models and containers)
  • main/waeup.kofa/trunk/src/waeup/kofa/university/facultiescontainer.py

    r7811 r7819  
    1919from zope.component.interfaces import IFactory
    2020from zope.interface import implementedBy
    21 from waeup.kofa.interfaces import IKOFAPluggable
     21from waeup.kofa.interfaces import IKofaPluggable
    2222from waeup.kofa.university.interfaces import IFacultiesContainer, IFaculty
    2323
     
    5252    """A plugin that creates container for faculties inside a university.
    5353    """
    54     grok.implements(IKOFAPluggable)
     54    grok.implements(IKofaPluggable)
    5555    grok.name('faculties')
    5656
    5757    def setup(self, site, name, logger):
    5858        if 'faculties' in site.keys():
    59             logger.warn('Could not create container for faculties in KOFA.')
     59            logger.warn('Could not create container for faculties in Kofa.')
    6060            return
    6161        site['faculties'] = FacultiesContainer()
  • main/waeup.kofa/trunk/src/waeup/kofa/university/facultiescontainer.txt

    r7811 r7819  
    77
    88.. :doctest:
    9 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111
     
    7777.. class:: AcademicsPlugin()
    7878
    79    .. attribute:: grok.implements(IKOFAPluggable)
     79   .. attribute:: grok.implements(IKofaPluggable)
    8080
    8181   This plugin component tells under which name (``faculties``) an
    82    instance of academics stuff should be created in plain KOFA
     82   instance of academics stuff should be created in plain Kofa
    8383   instances. It also tells the factory name for FacultiesContainer
    84    instances, which serve as root object for academics stuff in KOFA apps.
     84   instances, which serve as root object for academics stuff in Kofa apps.
    8585
    8686
  • main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.py

    r7811 r7819  
    2323from zope.interface import implementedBy
    2424from zope.component import getUtility
    25 from waeup.kofa.interfaces import IKOFAUtils
     25from waeup.kofa.interfaces import IKofaUtils
    2626from waeup.kofa.university.interfaces import (
    2727    IFaculty, IFacultyAdd, IDepartment)
     
    6161
    6262    def longtitle(self):
    63         insttypes_dict = getUtility(IKOFAUtils).getInstTypeDict()
     63        insttypes_dict = getUtility(IKofaUtils).getInstTypeDict()
    6464        result = "%s %s (%s)" % (
    6565            insttypes_dict[self.title_prefix],
  • main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.txt

    r7811 r7819  
    77
    88.. :doctest:
    9 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     9.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    1010
    1111
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r7811 r7819  
    2121from zope import schema
    2222from zope.interface import Attribute
    23 from waeup.kofa.interfaces import (IKOFAObject, IKOFAContainer)
     23from waeup.kofa.interfaces import (IKofaObject, IKofaContainer)
    2424from waeup.kofa.interfaces import MessageFactory as _
    2525from waeup.kofa.university.vocabularies import (
     
    3232    )
    3333
    34 class IFaculty(IKOFAContainer):
     34class IFaculty(IKofaContainer):
    3535    """Representation of a university faculty.
    3636    """
     
    7373IFacultyAdd['code'].order =  IFaculty['code'].order
    7474
    75 class IFacultiesContainer(IKOFAContainer):
     75class IFacultiesContainer(IKofaContainer):
    7676    """A container for faculties.
    7777    """
     
    8080
    8181        """
    82 class IDepartment(IKOFAObject):
     82class IDepartment(IKofaObject):
    8383    """Representation of a department.
    8484    """
     
    124124IDepartmentAdd['code'].order =  IDepartment['code'].order
    125125
    126 class ICoursesContainer(IKOFAContainer):
     126class ICoursesContainer(IKofaContainer):
    127127    """A container for faculties.
    128128    """
     
    133133        """
    134134
    135 class ICourse(IKOFAObject):
     135class ICourse(IKofaObject):
    136136    """Representation of a course.
    137137    """
     
    186186ICourseAdd['code'].order =  ICourse['code'].order
    187187
    188 class ICertificate(IKOFAObject):
     188class ICertificate(IKofaObject):
    189189    """Representation of a certificate.
    190190    """
     
    248248ICertificateAdd['code'].order =  ICertificate['code'].order
    249249
    250 class ICertificatesContainer(IKOFAContainer):
     250class ICertificatesContainer(IKofaContainer):
    251251    """A container for certificates.
    252252    """
     
    257257        """
    258258
    259 class ICertificateCourse(IKOFAObject):
     259class ICertificateCourse(IKofaObject):
    260260    """A certificatecourse is referring a course and provides some own
    261261       attributes.
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py

    r7811 r7819  
    2323from zope.interface.verify import verifyObject, verifyClass
    2424from waeup.kofa.interfaces import ICSVExporter
    25 from waeup.kofa.testing import KOFAUnitTestLayer
     25from waeup.kofa.testing import KofaUnitTestLayer
    2626from waeup.kofa.university import (
    2727    FacultiesContainer, Faculty, Department, Course, Certificate,
     
    3434class FacultyExporterTest(unittest.TestCase):
    3535
    36     layer = KOFAUnitTestLayer
     36    layer = KofaUnitTestLayer
    3737
    3838    def setUp(self):
     
    123123    # Tests for DepartmentExporter
    124124
    125     layer = KOFAUnitTestLayer
     125    layer = KofaUnitTestLayer
    126126
    127127    def setUp(self):
     
    214214    # Tests for CourseExporter
    215215
    216     layer = KOFAUnitTestLayer
     216    layer = KofaUnitTestLayer
    217217
    218218    def setUp(self):
     
    307307    # Tests for CertificateExporter
    308308
    309     layer = KOFAUnitTestLayer
     309    layer = KofaUnitTestLayer
    310310
    311311    def setUp(self):
     
    412412    # Tests for CertificateCourseExporter
    413413
    414     layer = KOFAUnitTestLayer
     414    layer = KofaUnitTestLayer
    415415
    416416    def setUp(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_facultiescontainer.py

    r7811 r7819  
    9090        self.assertEqual(
    9191            self._logger_factory.get_messages(),
    92             'Could not create container for faculties in KOFA.\n'
     92            'Could not create container for faculties in Kofa.\n'
    9393            )
    9494
  • main/waeup.kofa/trunk/src/waeup/kofa/university/vocabularies.py

    r7811 r7819  
    2222from zope.catalog.interfaces import ICatalog
    2323from zope.component import getUtility
    24 from waeup.kofa.interfaces import SimpleKOFAVocabulary, IKOFAUtils
     24from waeup.kofa.interfaces import SimpleKofaVocabulary, IKofaUtils
    2525from waeup.kofa.interfaces import MessageFactory as _
    2626
    27 course_levels = SimpleKOFAVocabulary(
     27course_levels = SimpleKofaVocabulary(
    2828    (_('Pre-Studies'),10),
    2929    (_('100 (Year 1)'),100),
     
    4141    """
    4242    def getValues(self, context):
    43         semesters_dict = getUtility(IKOFAUtils).getSemesterDict()
     43        semesters_dict = getUtility(IKofaUtils).getSemesterDict()
    4444        return semesters_dict.keys()
    4545
     
    4848
    4949    def getTitle(self, context, value):
    50         semesters_dict = getUtility(IKOFAUtils).getSemesterDict()
     50        semesters_dict = getUtility(IKofaUtils).getSemesterDict()
    5151        return semesters_dict[value]
    5252
     
    5656    """
    5757    def getValues(self, context):
    58         insttypes_dict = getUtility(IKOFAUtils).getInstTypeDict()
     58        insttypes_dict = getUtility(IKofaUtils).getInstTypeDict()
    5959        return sorted(insttypes_dict.keys())
    6060
     
    6363
    6464    def getTitle(self, context, value):
    65         insttypes_dict = getUtility(IKOFAUtils).getInstTypeDict()
     65        insttypes_dict = getUtility(IKofaUtils).getInstTypeDict()
    6666        return insttypes_dict[value]
    6767
     
    7171    """
    7272    def getValues(self, context):
    73         appcats_dict = getUtility(IKOFAUtils).getAppCatDict()
     73        appcats_dict = getUtility(IKofaUtils).getAppCatDict()
    7474        return sorted(appcats_dict.keys())
    7575
     
    7878
    7979    def getTitle(self, context, value):
    80         appcats_dict = getUtility(IKOFAUtils).getAppCatDict()
     80        appcats_dict = getUtility(IKofaUtils).getAppCatDict()
    8181        return appcats_dict[value]
    8282
     
    8686    """
    8787    def getValues(self, context):
    88         studymodes_dict = getUtility(IKOFAUtils).getStudyModesDict()
     88        studymodes_dict = getUtility(IKofaUtils).getStudyModesDict()
    8989        return sorted(studymodes_dict.keys())
    9090
     
    9393
    9494    def getTitle(self, context, value):
    95         studymodes_dict = getUtility(IKOFAUtils).getStudyModesDict()
     95        studymodes_dict = getUtility(IKofaUtils).getStudyModesDict()
    9696        return studymodes_dict[value]
    9797
  • main/waeup.kofa/trunk/src/waeup/kofa/userscontainer.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Users container for the KOFA portal.
     18"""Users container for the Kofa portal.
    1919"""
    2020import grok
  • main/waeup.kofa/trunk/src/waeup/kofa/userscontainer.txt

    r7811 r7819  
    1 User container for the KOFA
     1User container for the Kofa
    22***************************
    33
    44.. :doctest:
    5 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     5.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    66
    77Before we can start, we need some password managers available:
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """KOFA components for batch processing.
     18"""Kofa components for batch processing.
    1919
    2020Batch processors eat CSV files to add, update or remove large numbers
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.txt

    r7811 r7819  
    1010
    1111.. :NOdoctest:
    12 .. :NOlayer: waeup.kofa.testing.KOFAUnitTestLayer
     12.. :NOlayer: waeup.kofa.testing.KofaUnitTestLayer
    1313
    1414
     
    672672    '1'
    673673
    674     >>> from waeup.kofa.interfaces import SimpleKOFAVocabulary
     674    >>> from waeup.kofa.interfaces import SimpleKofaVocabulary
    675675    >>> field = Choice(
    676676    ...   title = u'Favourite Dish',
    677677    ...   default = 0,
    678     ...   vocabulary = SimpleKOFAVocabulary(
     678    ...   vocabulary = SimpleKofaVocabulary(
    679679    ...        ('N/A', 0), ('Pizza', 1),
    680680    ...        ('Cake', 2), ('Muffins', 3)),
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """General helper functions for KOFA.
     18"""General helper functions for Kofa.
    1919"""
    2020import os
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.txt

    r7811 r7819  
    1 :mod:`waeup.kofa.utils.helpers` -- Helpers for KOFA
     1:mod:`waeup.kofa.utils.helpers` -- Helpers for Kofa
    22***************************************************
    33
    44.. module:: waeup.kofa.utils.helpers
    55
    6 Helper functions for KOFA.
     6Helper functions for Kofa.
    77
    88.. :doctest:
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/importexport.py

    r7811 r7819  
    2222from cStringIO import StringIO
    2323from zope.interface import Interface
    24 from waeup.kofa.interfaces import (IKOFAObject, IKOFAExporter,
    25                                    IKOFAXMLExporter, IKOFAXMLImporter)
     24from waeup.kofa.interfaces import (IKofaObject, IKofaExporter,
     25                                   IKofaXMLExporter, IKofaXMLImporter)
    2626
    2727def readFile(f):
     
    4040
    4141class Exporter(grok.Adapter):
    42     """Export a KOFA object as pickle.
     42    """Export a Kofa object as pickle.
    4343
    4444    This all-purpose exporter exports attributes defined in schemata
    4545    and contained objects (if the exported thing is a container).
    4646    """
    47     grok.context(IKOFAObject)
    48     grok.provides(IKOFAExporter)
     47    grok.context(IKofaObject)
     48    grok.provides(IKofaExporter)
    4949
    5050    def __init__(self, context):
     
    6161
    6262class XMLExporter(grok.Adapter):
    63     """Export a KOFA object as XML.
     63    """Export a Kofa object as XML.
    6464
    6565    This all-purpose exporter exports XML representations of pickable
     
    6767    """
    6868    grok.context(Interface)
    69     grok.provides(IKOFAXMLExporter)
     69    grok.provides(IKofaXMLExporter)
    7070
    7171    def __init__(self, context):
     
    8484
    8585class XMLImporter(grok.Adapter):
    86     """Import a KOFA object from XML.
     86    """Import a Kofa object from XML.
    8787    """
    8888    grok.context(Interface)
    89     grok.provides(IKOFAXMLImporter)
     89    grok.provides(IKofaXMLImporter)
    9090
    9191    def __init__(self, context):
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/importexport.txt

    r7811 r7819  
    66
    77.. :doctest:
    8 .. :layer: waeup.kofa.testing.KOFAUnitTestLayer
     8.. :layer: waeup.kofa.testing.KofaUnitTestLayer
    99
    1010As imports and exports of data are a cruical point when doing updates
     
    6060an exporter::
    6161
    62     >>> from waeup.kofa.interfaces import IKOFAXMLExporter
    63     >>> exporter = IKOFAXMLExporter(mycave)
     62    >>> from waeup.kofa.interfaces import IKofaXMLExporter
     63    >>> exporter = IKofaXMLExporter(mycave)
    6464    >>> exporter
    6565    <waeup.kofa.utils.importexport.XMLExporter object at 0x...>
     
    101101Now we create an importer for that object:
    102102
    103     >>> from waeup.kofa.interfaces import IKOFAXMLImporter
    104     >>> importer = IKOFAXMLImporter(mycave)
     103    >>> from waeup.kofa.interfaces import IKofaXMLImporter
     104    >>> importer = IKofaXMLImporter(mycave)
    105105
    106106Importing from filenames
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_converters.py

    r7811 r7819  
    3636from waeup.kofa.utils.converters import IObjectConverter
    3737from waeup.kofa.utils.helpers import attrs_to_fields
    38 from waeup.kofa.interfaces import SimpleKOFAVocabulary
    39 
    40 colors = SimpleKOFAVocabulary(
     38from waeup.kofa.interfaces import SimpleKofaVocabulary
     39
     40colors = SimpleKofaVocabulary(
    4141    ('Red', u'red'),
    4242    ('Green', u'green'),
    4343    ('Blue', u'blue'),
    4444    )
    45 car_nums = SimpleKOFAVocabulary(
     45car_nums = SimpleKofaVocabulary(
    4646    ('None', 0),
    4747    ('One', 1),
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r7811 r7819  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """General helper utilities for KOFA.
     18"""General helper utilities for Kofa.
    1919"""
    2020import os
     
    2323from zope.i18n import translate
    2424from random import SystemRandom as r
    25 from waeup.kofa.interfaces import IKOFAUtils
     25from waeup.kofa.interfaces import IKofaUtils
    2626from waeup.kofa.interfaces import MessageFactory as _
    2727from waeup.kofa.smtp import send_mail as send_mail_internally
     
    3737    return True
    3838
    39 class KOFAUtils(grok.GlobalUtility):
     39class KofaUtils(grok.GlobalUtility):
    4040    """A collection of parameters and methods subject to customization.
    4141    """
    42     grok.implements(IKOFAUtils)
     42    grok.implements(IKofaUtils)
    4343    # This the only place where we define the portal language
    4444    # which is used for the translation of system messages
     
    161161        Returns True or False to indicate successful operation.
    162162        """
    163         subject = 'Your KOFA credentials'
     163        subject = 'Your Kofa credentials'
    164164        text = _(u"""Dear ${a},
    165165
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/objectwidget.py

    r7811 r7819  
    2525from zope.schema import getFieldNamesInOrder
    2626
    27 class KOFAObjectWidgetView(ObjectWidgetView):
     27class KofaObjectWidgetView(ObjectWidgetView):
    2828    template = ViewPageTemplateFile('objectwidget.pt')
    2929
    30 class KOFAObjectWidget(ObjectWidget):
     30class KofaObjectWidget(ObjectWidget):
    3131
    3232    def __init__(self, context, request, factory, **kw):
     
    5858
    5959    def _getView(self, request):
    60         return KOFAObjectWidgetView(self, request)
     60        return KofaObjectWidgetView(self, request)
    6161
    6262
    63 class KOFAObjectDisplayWidget(KOFAObjectWidget):
     63class KofaObjectDisplayWidget(KofaObjectWidget):
    6464
    6565    implementsOnly(IDisplayWidget)
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/restwidget.py

    r7811 r7819  
    2121from zope.formlib.widget import renderElement, DisplayWidget
    2222from waeup.kofa.utils.helpers import ReST2HTML
    23 from waeup.kofa.interfaces import IKOFAUtils
     23from waeup.kofa.interfaces import IKofaUtils
    2424
    2525
     
    3636        language separator - usually the first part has no language
    3737        descriptor - are interpreted as texts in the portal's language.
    38         The latter can be configured in waeup.srp.utils.utils.KOFAUtils.
     38        The latter can be configured in waeup.srp.utils.utils.KofaUtils.
    3939        """
    4040        if self._renderedValueSet():
     
    4646        parts = value.split('>>')
    4747        elements = {}
    48         lang = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     48        lang = getUtility(IKofaUtils).PORTAL_LANGUAGE
    4949        for part in parts:
    5050            if part[2:4] == u'<<':
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/sequencewidget.py

    r7811 r7819  
    2929from zope.schema.interfaces import IField, IList
    3030
    31 class KOFASequenceWidget(ListSequenceWidget):
     31class KofaSequenceWidget(ListSequenceWidget):
    3232    """A sequence widget for lists.
    3333
     
    5151@grok.implementer(IInputWidget)
    5252def seq_input_widget(obj, field, req, *args, **kw):
    53     return KOFASequenceWidget(obj, field, req, *args, **kw)
     53    return KofaSequenceWidget(obj, field, req, *args, **kw)
    5454
    5555@grok.adapter(IList, IField, IBrowserRequest)
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/tests/test_objectwidget.py

    r7811 r7819  
    3737from zope.formlib.interfaces import IWidgetInputErrorView
    3838
    39 from waeup.kofa.widgets.objectwidget import KOFAObjectWidget as ObjectWidget
     39from waeup.kofa.widgets.objectwidget import KofaObjectWidget as ObjectWidget
    4040from waeup.kofa.widgets.objectwidget import (
    41     KOFAObjectDisplayWidget as ObjectDisplayWidget)
     41    KofaObjectDisplayWidget as ObjectDisplayWidget)
    4242
    4343class ITestContact(Interface):
  • main/waeup.kofa/trunk/src/waeup/kofa/workflow.py

    r7811 r7819  
    2525from zope.security.interfaces import NoInteraction
    2626from zope.security.management import getInteraction
    27 from waeup.kofa.interfaces import IKOFAWorkflowInfo
     27from waeup.kofa.interfaces import IKofaWorkflowInfo
    2828
    29 class KOFAWorkflow(Workflow):
     29class KofaWorkflow(Workflow):
    3030    """A :mod:`hurry.workflow` workflow with more appropriate error
    3131       messages.
     
    7171        return False
    7272
    73 class KOFAWorkflowInfo(WorkflowInfo):
     73class KofaWorkflowInfo(WorkflowInfo):
    7474    """A workflow info that provides a convenience transition getter.
    7575    """
    7676
    77     grok.provides(IKOFAWorkflowInfo)
     77    grok.provides(IKofaWorkflowInfo)
    7878
    7979    def getManualTransitions(self):
Note: See TracChangeset for help on using the changeset viewer.