Changeset 7811


Ignore:
Timestamp:
8 Mar 2012, 19:00:51 (13 years ago)
Author:
uli
Message:

Rename all non-locales stuff from sirp to kofa.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
260 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/__init__.py

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

    r7137 r7811  
    44
    55Main content components are defined in
    6 :mod:`waeup.sirp.accesscodes.accesscode`. This subpackage also
     6:mod:`waeup.kofa.accesscodes.accesscode`. This subpackage also
    77provides a _catalog_ to lookup any access code quickly and a
    88_workflow_ to guarantee consistent states and transitions when dealing
     
    1111We also provide UI components to generate, archive, import and
    1212reimport access codes or batches thereof. These parts are defined in
    13 :mod:`waeup.sirp.accesscodes.browser`.
     13:mod:`waeup.kofa.accesscodes.browser`.
    1414
    1515The interfaces of this subpackage are defined in
    16 :mod:`waeup.sirp.accesscodes.interfaces`.
     16:mod:`waeup.kofa.accesscodes.interfaces`.
    1717"""
    18 from waeup.sirp.accesscodes.accesscode import (
     18from waeup.kofa.accesscodes.accesscode import (
    1919    get_access_code, invalidate_accesscode, disable_accesscode,
    2020    reenable_accesscode, create_accesscode,
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.py

    r7747 r7811  
    3131from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    3232from random import SystemRandom as random
    33 from waeup.sirp.interfaces import ISIRPPluggable, IObjectHistory
    34 from waeup.sirp.utils.logger import Logger
    35 from waeup.sirp.accesscodes.interfaces import (
     33from waeup.kofa.interfaces import IKOFAPluggable, IObjectHistory
     34from waeup.kofa.utils.logger import Logger
     35from waeup.kofa.accesscodes.interfaces import (
    3636    IAccessCode, IAccessCodeBatch, IAccessCodeBatchContainer
    3737    )
    38 from waeup.sirp.accesscodes.workflow import DISABLED, USED, ac_states_dict
     38from waeup.kofa.accesscodes.workflow import DISABLED, USED, ac_states_dict
    3939
    4040class AccessCode(grok.Model):
     
    4242
    4343    Implements
    44     :class:`waeup.sirp.accesscodes.interfaces.IAccessCode`. :class:`AccessCode`
     44    :class:`waeup.kofa.accesscodes.interfaces.IAccessCode`. :class:`AccessCode`
    4545    instances are normally part of an :class:`AccessCodeBatch` so
    4646    their representation (or code) is built with the containing batch
     
    6868    The state of an access code is something like 'used', 'disabled',
    6969    etc. and determined by the workflow defined in
    70     :mod:`waeup.sirp.accesscodes.workflow`. This also means that
     70    :mod:`waeup.kofa.accesscodes.workflow`. This also means that
    7171    instead of setting the status of an access code directly (you
    7272    can't do that easily, and yes, that's intentionally), you have to
    7373    trigger a transition (that might fail, if the transition is not
    7474    allowed in terms of logic or permissions). See
    75     :mod:`waeup.sirp.accesscodes.workflow` for details.
     75    :mod:`waeup.kofa.accesscodes.workflow` for details.
    7676
    7777    """
     
    139139    @property
    140140    def history(self):
    141         """A :class:`waeup.sirp.objecthistory.ObjectHistory` instance.
     141        """A :class:`waeup.kofa.objecthistory.ObjectHistory` instance.
    142142        """
    143143        history = IObjectHistory(self)
     
    285285        If the path does not exist yet, it is created. The path is
    286286        normally ``accesscodes/imports`` below the datacenter storage
    287         path (see :data:`waeup.sirp.accesscodes.Datacenter.storage`).
     287        path (see :data:`waeup.kofa.accesscodes.Datacenter.storage`).
    288288        """
    289289        site = grok.getSite()
     
    403403        return
    404404
    405     logger_name = 'waeup.sirp.${sitename}.accesscodes'
     405    logger_name = 'waeup.kofa.${sitename}.accesscodes'
    406406    logger_filename = 'accesscodes.log'
    407407
     
    415415class AccessCodePlugin(grok.GlobalUtility):
    416416    grok.name('accesscodes')
    417     grok.implements(ISIRPPluggable)
     417    grok.implements(IKOFAPluggable)
    418418
    419419    def setup(self, site, name, logger):
     
    481481    `arg` tells what kind of transition to trigger. This will be a
    482482    transition id like ``'use'`` or ``'init'``, or some transition
    483     target like :data:`waeup.sirp.accesscodes.workflow.INITIALIZED`.
     483    target like :data:`waeup.kofa.accesscodes.workflow.INITIALIZED`.
    484484
    485485    If `toward` is ``False`` (the default) you have to pass a
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.txt

    r7321 r7811  
    1 :mod:`waeup.sirp.accesscodes.accesscode` -- access codes (aka PINs)
     1:mod:`waeup.kofa.accesscodes.accesscode` -- access codes (aka PINs)
    22*******************************************************************
    33
    4 .. module:: waeup.sirp.accesscodes.accesscode
     4.. module:: waeup.kofa.accesscodes.accesscode
    55
    66Components that represent access codes and related.
    77
    88.. :NOdoctest:
    9 .. :NOlayer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :NOlayer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111About access-codes
     
    2828unique random number of 10 digits.
    2929
    30 For the generation of the random number :mod:`waeup.sirp` requires a
     30For the generation of the random number :mod:`waeup.kofa` requires a
    3131'urandom' entropy provider which is available with most standard
    3232Unix/Linux systems. This makes the generated numbers relatively
     
    5757
    5858   The class implements
    59    :mod:`waeup.sirp.accesscodes.interfaces.IAccessCode`:
    60 
    61     >>> from waeup.sirp.accesscodes.interfaces import IAccessCode
    62     >>> from waeup.sirp.accesscodes.accesscodes import AccessCode
     59   :mod:`waeup.kofa.accesscodes.interfaces.IAccessCode`:
     60
     61    >>> from waeup.kofa.accesscodes.interfaces import IAccessCode
     62    >>> from waeup.kofa.accesscodes.accesscodes import AccessCode
    6363    >>> from zope.interface.verify import verifyClass
    6464    >>> verifyClass(IAccessCode, AccessCode)
     
    150150
    151151   A persistent :class:`grok.Model`. It implements
    152    :class:`waeup.sirp.accesscodes.interfaces.IAccessCodeBatch`.
     152   :class:`waeup.kofa.accesscodes.interfaces.IAccessCodeBatch`.
    153153
    154154   When creating a batch, all entries (access-codes) are generated as
     
    306306:class:`AccessCodeBatch` implements :class:`IAccessCodeBatch`:
    307307
    308     >>> from waeup.sirp.accesscodes.interfaces import IAccessCodeBatch
    309     >>> from waeup.sirp.accesscodes.accesscodes import AccessCodeBatch
     308    >>> from waeup.kofa.accesscodes.interfaces import IAccessCodeBatch
     309    >>> from waeup.kofa.accesscodes.accesscodes import AccessCodeBatch
    310310    >>> from zope.interface.verify import verifyClass
    311311    >>> verifyClass(IAccessCodeBatch, AccessCodeBatch)
     
    317317
    318318    >>> import datetime
    319     >>> from waeup.sirp.accesscodes.accesscodes import AccessCodeBatch
     319    >>> from waeup.kofa.accesscodes.accesscodes import AccessCodeBatch
    320320    >>> batch = AccessCodeBatch(
    321321    ...   datetime.datetime(2009, 12, 23), 'Fred','APP', 12.12, 3, num=10)
     
    331331
    332332    >>> [x for x in batch.entries()]
    333     [<waeup.sirp...AccessCode object at 0x...>, ...]
     333    [<waeup.kofa...AccessCode object at 0x...>, ...]
    334334
    335335Getting a single entry from the batch:
     
    338338    >>> ac = batch.getAccessCode(ac_id)
    339339    >>> ac
    340     <waeup.sirp...AccessCode object at 0x...>
     340    <waeup.kofa...AccessCode object at 0x...>
    341341
    342342    >>> ac is list(batch.entries())[0]
     
    374374#
    375375#    >>> batch.getAccessCodeForStudentId('some_user_id')
    376 #    <waeup.sirp...AccessCode object at 0x...>
     376#    <waeup.kofa...AccessCode object at 0x...>
    377377#
    378378#Non-existent values will cause a :exc:`KeyError`:
     
    440440    >>> result = batch.search(0, 'serial')
    441441    >>> result
    442     [<waeup.sirp...AccessCode object at 0x...>]
     442    [<waeup.kofa...AccessCode object at 0x...>]
    443443
    444444    >>> result[0].batch_serial
     
    545545Creating a batch container:
    546546
    547     >>> from waeup.sirp.accesscodes.accesscodes import (
     547    >>> from waeup.kofa.accesscodes.accesscodes import (
    548548    ...   AccessCodeBatchContainer)
    549549    >>> container = AccessCodeBatchContainer()
     
    561561
    562562    >>> container.search(1, 'serial')
    563     [<waeup.sirp...AccessCode object at 0x...>,
    564      <waeup.sirp...AccessCode object at 0x...>]
     563    [<waeup.kofa...AccessCode object at 0x...>,
     564     <waeup.kofa...AccessCode object at 0x...>]
    565565
    566566    >>> container.search('not-a-number', 'serial')
     
    569569    >>> result = container.search('1', 'serial')
    570570    >>> result
    571     [<waeup.sirp...AccessCode object at 0x...>,
    572      <waeup.sirp...AccessCode object at 0x...>]
     571    [<waeup.kofa...AccessCode object at 0x...>,
     572     <waeup.kofa...AccessCode object at 0x...>]
    573573
    574574Searching for ACs:
     
    576576    >>> ac = result[0]
    577577    >>> container.search(ac.representation, 'pin')
    578     [<waeup.sirp...AccessCode object at 0x...>]
     578    [<waeup.kofa...AccessCode object at 0x...>]
    579579
    580580Searching for student IDs:
     
    583583#    ...   ac.representation, 'some_user')
    584584#    >>> container.search('some_user', 'stud_id')
    585 #    [<waeup.sirp...AccessCode object at 0x...>]
     585#    [<waeup.kofa...AccessCode object at 0x...>]
    586586
    587587
     
    591591.. class:: AccessCodePlugin
    592592
    593   A `waeup.sirp` plugin that updates existing SIRP 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(ISIRPPluggable)
     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   ISIRPPluggable 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.sirp.interfaces import ISIRPPluggable
    618     >>> plugin = getUtility(ISIRPPluggable, name='accesscodes')
     617    >>> from waeup.kofa.interfaces import IKOFAPluggable
     618    >>> plugin = getUtility(IKOFAPluggable, name='accesscodes')
    619619    >>> plugin
    620     <waeup.sirp.accesscodes.accesscodes.AccessCodePlugin object at 0x...>
     620    <waeup.kofa.accesscodes.accesscodes.AccessCodePlugin object at 0x...>
    621621
    622622  It provides a `setup()` and an `update()` method. Both have to be
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/api.txt

    r6408 r7811  
    1 :mod:`waeup.sirp.accesscodes` -- Access Codes
     1:mod:`waeup.kofa.accesscodes` -- Access Codes
    22*********************************************
    33
    4 .. module:: waeup.sirp.accesscodes
     4.. module:: waeup.kofa.accesscodes
    55
    66Components that represent access codes and related components.
     
    99==========
    1010
    11 The :mod:`waeup.sirp.accesscodes` module provides the following submodules:
     11The :mod:`waeup.kofa.accesscodes` module provides the following submodules:
    1212
    1313.. toctree::
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.py

    r7747 r7811  
    2121from datetime import datetime
    2222from hurry.workflow.interfaces import InvalidTransitionError
    23 from waeup.sirp.browser.resources import datatable
    24 from waeup.sirp.browser import SIRPPage, SIRPAddFormPage, NullValidator
    25 from waeup.sirp.browser.breadcrumbs import Breadcrumb
    26 from waeup.sirp.browser.viewlets import (
     23from waeup.kofa.browser.resources import datatable
     24from waeup.kofa.browser import KOFAPage, KOFAAddFormPage, NullValidator
     25from waeup.kofa.browser.breadcrumbs import Breadcrumb
     26from waeup.kofa.browser.viewlets import (
    2727    AdminTask, AddActionButton, SearchActionButton, BatchOpButton, ManageLink)
    28 from waeup.sirp.interfaces import ISIRPObject
    29 from waeup.sirp.interfaces import MessageFactory as _
    30 from waeup.sirp.accesscodes.interfaces import (
     28from waeup.kofa.interfaces import IKOFAObject
     29from waeup.kofa.interfaces import MessageFactory as _
     30from waeup.kofa.accesscodes.interfaces import (
    3131    IAccessCodeBatchContainer, IAccessCodeBatch,
    3232    )
    33 from waeup.sirp.accesscodes.catalog import search
    34 from waeup.sirp.browser.layout import action
    35 
    36 grok.context(ISIRPObject)
    37 
    38 class BatchContainerPage(SIRPPage):
     33from waeup.kofa.accesscodes.catalog import search
     34from waeup.kofa.browser.layout import action
     35
     36grok.context(IKOFAObject)
     37
     38class BatchContainerPage(KOFAPage):
    3939    grok.name('index')
    4040    grok.context(IAccessCodeBatchContainer)
     
    5555        if isinstance(batches, basestring):
    5656            batches = [batches]
    57         ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
     57        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    5858        for name in batches:
    5959            batch = self.context[name]
     
    7070            self.context.logger_info(ob_class, message)
    7171
    72 class AddBatchPage(SIRPAddFormPage):
     72class AddBatchPage(KOFAAddFormPage):
    7373    grok.name('add')
    7474    grok.context(IAccessCodeBatchContainer)
     
    9292            mapping = {'a':data['entry_num']}))
    9393        self.flash(_('Data written to ${a}', mapping = {'a':csv_file}))
    94         ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
     94        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    9595        message = 'created: %s (%d, %f)' % (
    9696            csv_file, data['entry_num'], data['cost'])
     
    103103        self.redirect(self.url(self.context))
    104104
    105 class ReimportBatchPage(SIRPPage):
     105class ReimportBatchPage(KOFAPage):
    106106    """Screen for reimporting AC batches.
    107107    """
     
    139139            self.flash(_('Successfully reimported: ${a}',
    140140                mapping = {'a':filename}))
    141             ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
     141            ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    142142            message = 'reimported: %s' % filename
    143143            self.context.logger_info(ob_class, message)
    144144        self.redirect(self.url(self.context))
    145145
    146 class BatchContainerSearchPage(SIRPPage):
     146class BatchContainerSearchPage(KOFAPage):
    147147    grok.name('search')
    148148    grok.context(IAccessCodeBatchContainer)
     
    174174        if isinstance(entries, basestring):
    175175            entries = [entries]
    176         ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
     176        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    177177        for entry in entries:
    178178            if 'disable' in form:
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.txt

    r7748 r7811  
    1 :mod:`waeup.sirp.accesscodes.browser` -- UI components for access-codes
     1:mod:`waeup.kofa.accesscodes.browser` -- UI components for access-codes
    22***********************************************************************
    33
    4 .. module:: waeup.sirp.accesscodes.browser
    5 
    6 Here we visit the access-code related parts of a SIRP site using
     4.. module:: waeup.kofa.accesscodes.browser
     5
     6Here we visit the access-code related parts of a KOFA site using
    77a virtual browser.
    88
     
    2020    >>> root = getRootFolder()
    2121
    22     >>> from waeup.sirp.app import University
     22    >>> from waeup.kofa.app import University
    2323    >>> u = University()
    2424    >>> root['myuniversity'] = u
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/batchcontainer.pt

    r7719 r7811  
    1 <form i18n:domain="waeup.sirp" method="POST">
     1<form i18n:domain="waeup.kofa" method="POST">
    22  <p i18n:translate="">
    33    The following batches are available:
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/reimportbatchpage.pt

    r7719 r7811  
    1 <p i18n:domain="waeup.sirp">
     1<p i18n:domain="waeup.kofa">
    22Please select the files to reimport. Please note, that batches with
    33same name have to be deleted before.
    44</p>
    5 <form method="POST" i18n:domain="waeup.sirp">
     5<form method="POST" i18n:domain="waeup.kofa">
    66  <table>
    77    <thead>
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser_templates/searchpage.pt

    r7754 r7811  
    1 <form method="POST" i18n:domain="waeup.sirp">
     1<form method="POST" i18n:domain="waeup.kofa">
    22<br />
    33  <input type="submit" class="btn primary" name="search"
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/catalog.py

    r7754 r7811  
    2323from hurry.query.query import Query
    2424from zope.index.text.parsetree import ParseError
    25 from waeup.sirp.interfaces import IUniversity, IQueryResultItem
    26 from waeup.sirp.accesscodes.interfaces import IAccessCode
     25from waeup.kofa.interfaces import IUniversity, IQueryResultItem
     26from waeup.kofa.accesscodes.interfaces import IAccessCode
    2727
    2828class AccessCodeIndexes(grok.Indexes):
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/interfaces.py

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

    r7719 r7811  
    2828from zope.interface.verify import verifyObject, verifyClass
    2929from zope.testing import renormalizing
    30 from waeup.sirp.app import University
    31 from waeup.sirp.interfaces import IObjectHistory, ISIRPPluggable
    32 from waeup.sirp.testing import (
     30from waeup.kofa.app import University
     31from waeup.kofa.interfaces import IObjectHistory, IKOFAPluggable
     32from waeup.kofa.testing import (
    3333    FunctionalLayer, FunctionalTestCase, setUp, tearDown, getRootFolder)
    34 from waeup.sirp.accesscodes.accesscode import (
     34from waeup.kofa.accesscodes.accesscode import (
    3535    AccessCodeBatch, get_access_code, invalidate_accesscode, AccessCode,
    3636    disable_accesscode, reenable_accesscode, fire_transition,
    3737    AccessCodeBatchContainer, AccessCodePlugin)
    38 from waeup.sirp.accesscodes.interfaces import (
     38from waeup.kofa.accesscodes.interfaces import (
    3939    IAccessCode, IAccessCodeBatch,  IAccessCodeBatchContainer,)
    40 from waeup.sirp.accesscodes.workflow import INITIALIZED, USED, DISABLED
     40from waeup.kofa.accesscodes.workflow import INITIALIZED, USED, DISABLED
    4141
    4242
     
    412412    def test_iface(self):
    413413        plugin = AccessCodePlugin()
    414         assert verifyObject(ISIRPPluggable, plugin)
    415         assert verifyClass(ISIRPPluggable, 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/tests/test_catalog.py

    r7195 r7811  
    2222from zope.component.hooks import setSite
    2323from zope.interface.verify import verifyClass, verifyObject
    24 from waeup.sirp.app import University
    25 from waeup.sirp.interfaces import IQueryResultItem
    26 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    27 from waeup.sirp.accesscodes.accesscode import (
     24from waeup.kofa.app import University
     25from waeup.kofa.interfaces import IQueryResultItem
     26from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     27from waeup.kofa.accesscodes.accesscode import (
    2828    AccessCodeBatch, invalidate_accesscode, disable_accesscode)
    29 from waeup.sirp.accesscodes.workflow import INITIALIZED, USED, DISABLED
    30 from waeup.sirp.accesscodes.catalog import AccessCodeQueryResultItem, search
     29from waeup.kofa.accesscodes.workflow import INITIALIZED, USED, DISABLED
     30from waeup.kofa.accesscodes.catalog import AccessCodeQueryResultItem, search
    3131
    3232class CatalogTestSetup(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/tests/test_workflow.py

    r7195 r7811  
    1818import shutil
    1919import tempfile
    20 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    21 from waeup.sirp.accesscodes.workflow import (
     20from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     21from waeup.kofa.accesscodes.workflow import (
    2222    invalidate_action, disable_used_action, disable_unused_action,
    2323    reenable_action,
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/workflow.py

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

    r7321 r7811  
    2121from zope.component.interfaces import ObjectEvent
    2222from zope.pluggableauth import PluggableAuthentication
    23 from waeup.sirp.authentication import setup_authentication
    24 from waeup.sirp.datacenter import DataCenter
    25 from waeup.sirp.students.container import StudentsContainer
    26 from waeup.sirp.hostels.container import HostelsContainer
    27 from waeup.sirp.interfaces import (
    28     IUniversity, ISIRPPluggable, IObjectUpgradeEvent, )
    29 from waeup.sirp.userscontainer import UsersContainer
    30 from waeup.sirp.utils.logger import Logger
    31 from waeup.sirp.utils.helpers import attrs_to_fields
    32 from waeup.sirp.configuration import ConfigurationContainer
     23from waeup.kofa.authentication import setup_authentication
     24from waeup.kofa.datacenter import DataCenter
     25from waeup.kofa.students.container import StudentsContainer
     26from waeup.kofa.hostels.container import HostelsContainer
     27from waeup.kofa.interfaces import (
     28    IUniversity, IKOFAPluggable, IObjectUpgradeEvent, )
     29from waeup.kofa.userscontainer import UsersContainer
     30from waeup.kofa.utils.logger import Logger
     31from waeup.kofa.utils.helpers import attrs_to_fields
     32from waeup.kofa.configuration import ConfigurationContainer
    3333
    3434class University(grok.Application, grok.Container, Logger):
     
    6464        """Create instances of all plugins defined somewhere.
    6565        """
    66         for name, plugin in getUtilitiesFor(ISIRPPluggable):
     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(ISIRPPluggable):
     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

    r7333 r7811  
    1 :mod:`waeup.sirp.app` -- central components for SIRP
     1:mod:`waeup.kofa.app` -- central components for KOFA
    22****************************************************
    33
    44.. :doctest:
    5 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     5.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    66
    7 .. module:: waeup.sirp.app
     7.. module:: waeup.kofa.app
    88
    99.. class:: University
    1010
    11   The main SIRP 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.
     
    2121     An arbitrary object containing "faculties". In the case of
    2222     `University` it is a container of type
    23      `waeup.sirp.interfaces.IFacultiesContainer`.
     23     `waeup.kofa.interfaces.IFacultiesContainer`.
    2424
    2525
     
    3737instance:
    3838
    39     >>> from waeup.sirp.app import University
     39    >>> from waeup.kofa.app import University
    4040    >>> myuniversity = University()
    4141    >>> myuniversity
    42     <waeup.sirp.app.University object at 0x...>
     42    <waeup.kofa.app.University object at 0x...>
    4343
    4444Instances of `University` comply with the interface
    45 `waeup.sirp.interfaces.IUniversity`:
     45`waeup.kofa.interfaces.IUniversity`:
    4646
    4747    >>> from zope.interface.verify import verifyClass
    48     >>> from waeup.sirp.interfaces import IUniversity
     48    >>> from waeup.kofa.interfaces import IUniversity
    4949    >>> verifyClass(IUniversity, University)
    5050    True
     
    5353interface:
    5454
    55     >>> from waeup.sirp.app import University
     55    >>> from waeup.kofa.app import University
    5656    >>> myuniversity = University()
    5757    >>> myuniversity['configuration'].name
     
    5959
    6060    >>> myuniversity['faculties']
    61     <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
     61    <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
    6262
    6363  >>> myuniversity['students']
    64   <waeup.sirp.students.container.StudentsContainer object at 0x...>
     64  <waeup.kofa.students.container.StudentsContainer object at 0x...>
    6565
    6666  >>> myuniversity['users']
    67   <waeup.sirp.userscontainer.UsersContainer object at 0x...>
     67  <waeup.kofa.userscontainer.UsersContainer object at 0x...>
    6868
    6969  >>> myuniversity['datacenter']
    70   <waeup.sirp.datacenter.DataCenter object at 0x...>
     70  <waeup.kofa.datacenter.DataCenter object at 0x...>
    7171
    7272  >>> myuniversity['configuration']
    73   <waeup.sirp.configuration.ConfigurationContainer object at 0x...>
     73  <waeup.kofa.configuration.ConfigurationContainer object at 0x...>
    7474
    7575We can export universities. For this we lookup an appropriate exporter
    7676first::
    7777
    78   >>> from waeup.sirp.interfaces import ISIRPExporter
    79   >>> exporter = ISIRPExporter(myuniversity)
     78  >>> from waeup.kofa.interfaces import IKOFAExporter
     79  >>> exporter = IKOFAExporter(myuniversity)
    8080  >>> exporter
    81   <waeup.sirp.utils.importexport.Exporter object at 0x...>
     81  <waeup.kofa.utils.importexport.Exporter object at 0x...>
    8282
    8383Now we can trigger the export::
     
    9090memory file::
    9191
    92   >>> from waeup.sirp.interfaces import ISIRPXMLExporter
    93   >>> exporter = ISIRPXMLExporter(myuniversity)
     92  >>> from waeup.kofa.interfaces import IKOFAXMLExporter
     93  >>> exporter = IKOFAXMLExporter(myuniversity)
    9494  >>> f = exporter.export()
    9595  >>> f
     
    103103  </pickle>
    104104
    105 SIRP plugins
     105KOFA plugins
    106106============
    107107
    108 waeup.sirp provides an API to 'plugin' components. Things that should
    109 be setup at creation time of a SIRP application can indicate
    110 that by providing a utility providing ISIRPPlugin.
     108waeup.kofa provides an API to 'plugin' components. Things that should
     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.sirp.interfaces import ISIRPPluggable
     115   >>> from waeup.kofa.interfaces import IKOFAPluggable
    116116   >>> from zope.component import getAdapters, getUtilitiesFor
    117    >>> sorted(list(getUtilitiesFor(ISIRPPluggable)))
    118    [(u'accesscodes', <waeup.sirp.accesscodes...AccessCodePlugin ...)]
     117   >>> sorted(list(getUtilitiesFor(IKOFAPluggable)))
     118   [(u'accesscodes', <waeup.kofa.accesscodes...AccessCodePlugin ...)]
    119119
    120120
     
    122122
    123123   >>> import grok
    124    >>> from waeup.sirp.interfaces import ISIRPPluggable
     124   >>> from waeup.kofa.interfaces import IKOFAPluggable
    125125   >>> class MyPlugin(grok.GlobalUtility):
    126    ...   grok.implements(ISIRPPluggable)
     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 SIRP instance, we will get a message:
     138and setup a new KOFA instance, we will get a message:
    139139
    140    >>> from waeup.sirp.app import University
     140   >>> from waeup.kofa.app import University
    141141   >>> site = University()
    142142   Setup was called for
    143    <waeup.sirp.app.University object at 0x...>
     143   <waeup.kofa.app.University object at 0x...>
    144144
    145145Apparently the plugin can do with the University object whatever it
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/__init__.py

    r7377 r7811  
    22"""
    33# Make this a package.
    4 from waeup.sirp.applicants.applicant import (
     4from waeup.kofa.applicants.applicant import (
    55    Applicant, ApplicantFactory, ApplicantImageStoreHandler,
    66    ApplicantImageNameChooser,
    77    )
    8 from waeup.sirp.applicants.container import ApplicantsContainer
    9 from waeup.sirp.applicants.root import ApplicantsRoot
    10 from waeup.sirp.applicants.dynamicroles import (
     8from waeup.kofa.applicants.container import ApplicantsContainer
     9from waeup.kofa.applicants.root import ApplicantsRoot
     10from waeup.kofa.applicants.dynamicroles import (
    1111    ApplicantPrincipalRoleManager,)
    1212
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py

    r7686 r7811  
    2626from zope.interface import implementedBy
    2727from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    28 from waeup.sirp.app import University
    29 from waeup.sirp.image import SIRPImageFile
    30 from waeup.sirp.imagestorage import DefaultFileStoreHandler
    31 from waeup.sirp.interfaces import (
    32     IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, ISIRPUtils,
     28from waeup.kofa.app import University
     29from waeup.kofa.image import KOFAImageFile
     30from waeup.kofa.imagestorage import DefaultFileStoreHandler
     31from waeup.kofa.interfaces import (
     32    IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, IKOFAUtils,
    3333    IExtFileStore, IPDF, IUserAccount)
    34 from waeup.sirp.students.vocabularies import RegNumNotInSource
    35 from waeup.sirp.utils.helpers import attrs_to_fields
    36 from waeup.sirp.applicants.interfaces import IApplicant, IApplicantEdit
    37 from waeup.sirp.applicants.workflow import application_states_dict
     34from waeup.kofa.students.vocabularies import RegNumNotInSource
     35from waeup.kofa.utils.helpers import attrs_to_fields
     36from waeup.kofa.applicants.interfaces import IApplicant, IApplicantEdit
     37from waeup.kofa.applicants.workflow import application_states_dict
    3838
    3939class Applicant(grok.Container):
     
    7676    def display_fullname(self):
    7777        middlename = getattr(self, 'middlename', None)
    78         sirp_utils = getUtility(ISIRPUtils)
    79         return sirp_utils.fullname(self.firstname, self.lastname, middlename)
     78        kofa_utils = getUtility(IKOFAUtils)
     79        return kofa_utils.fullname(self.firstname, self.lastname, middlename)
    8080
    8181    def createStudent(self, view=None):
     
    196196
    197197    This chooser is registered as an adapter providing
    198     :class:`waeup.sirp.interfaces.IFileStoreNameChooser`.
     198    :class:`waeup.kofa.interfaces.IFileStoreNameChooser`.
    199199
    200200    File store name choosers like this one are only convenience
     
    203203    manually setting up filenames for applicants.
    204204
    205     .. seealso:: :mod:`waeup.sirp.imagestorage`
     205    .. seealso:: :mod:`waeup.kofa.imagestorage`
    206206
    207207    """
     
    291291            ApplicantImageStoreHandler, self).createFile(
    292292            store, root,  filename, file_id, file)
    293         return file, path, SIRPImageFile(
     293        return file, path, KOFAImageFile(
    294294            file_obj.filename, file_obj.data)
    295295
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/authentication.py

    r7364 r7811  
    2121import grok
    2222from zope.pluggableauth.interfaces import IAuthenticatorPlugin
    23 from waeup.sirp.interfaces import IAuthPluginUtility, IUserAccount
    24 from waeup.sirp.applicants.interfaces import IApplicant
    25 from waeup.sirp.students.authentication import (
     23from waeup.kofa.interfaces import IAuthPluginUtility, IUserAccount
     24from waeup.kofa.applicants.interfaces import IApplicant
     25from waeup.kofa.students.authentication import (
    2626    StudentAccount, StudentsAuthenticatorPlugin)
    2727
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py

    r7271 r7811  
    2424from zope.component import queryUtility
    2525from zope.catalog.interfaces import ICatalog
    26 from waeup.sirp.interfaces import (
     26from waeup.kofa.interfaces import (
    2727    IBatchProcessor, IObjectConverter, FatalCSVError)
    28 from waeup.sirp.utils.batching import BatchProcessor
    29 from waeup.sirp.applicants.interfaces import (
     28from waeup.kofa.utils.batching import BatchProcessor
     29from waeup.kofa.applicants.interfaces import (
    3030    IApplicantsContainer, IApplicant, IApplicantUpdateByRegNo)
    3131
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r7741 r7811  
    2828from hurry.workflow.interfaces import (
    2929    IWorkflowInfo, IWorkflowState, InvalidTransitionError)
    30 from waeup.sirp.applicants.interfaces import (
     30from waeup.kofa.applicants.interfaces import (
    3131    IApplicant, IApplicantEdit, IApplicantsRoot,
    3232    IApplicantsContainer, IApplicantsContainerAdd,
    3333    MAX_UPLOAD_SIZE, IApplicantOnlinePayment, IApplicantsUtils
    3434    )
    35 from waeup.sirp.applicants.workflow import INITIALIZED, STARTED, PAID, SUBMITTED
    36 from waeup.sirp.browser import (
    37     SIRPPage, SIRPEditFormPage, SIRPAddFormPage, SIRPDisplayFormPage,
     35from waeup.kofa.applicants.workflow import INITIALIZED, STARTED, PAID, SUBMITTED
     36from waeup.kofa.browser import (
     37    KOFAPage, KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
    3838    DEFAULT_PASSPORT_IMAGE_PATH)
    39 from waeup.sirp.browser.interfaces import ICaptchaManager
    40 from waeup.sirp.browser.breadcrumbs import Breadcrumb
    41 from waeup.sirp.browser.layout import (
     39from waeup.kofa.browser.interfaces import ICaptchaManager
     40from waeup.kofa.browser.breadcrumbs import Breadcrumb
     41from waeup.kofa.browser.layout import (
    4242    NullValidator, jsaction, action, UtilityView)
    43 from waeup.sirp.browser.pages import add_local_role, del_local_roles
    44 from waeup.sirp.browser.resources import datepicker, tabs, datatable, warning
    45 from waeup.sirp.interfaces import (
    46     ISIRPObject, ILocalRolesAssignable, IExtFileStore, IPDF,
    47     IFileStoreNameChooser, IPasswordValidator, IUserAccount, ISIRPUtils)
    48 from waeup.sirp.interfaces import MessageFactory as _
    49 from waeup.sirp.permissions import get_users_with_local_roles
    50 from waeup.sirp.students.interfaces import IStudentsUtils
    51 from waeup.sirp.utils.helpers import string_from_bytes, file_size
    52 from waeup.sirp.widgets.datewidget import (
     43from waeup.kofa.browser.pages import add_local_role, del_local_roles
     44from waeup.kofa.browser.resources import datepicker, tabs, datatable, warning
     45from waeup.kofa.interfaces import (
     46    IKOFAObject, ILocalRolesAssignable, IExtFileStore, IPDF,
     47    IFileStoreNameChooser, IPasswordValidator, IUserAccount, IKOFAUtils)
     48from waeup.kofa.interfaces import MessageFactory as _
     49from waeup.kofa.permissions import get_users_with_local_roles
     50from waeup.kofa.students.interfaces import IStudentsUtils
     51from waeup.kofa.utils.helpers import string_from_bytes, file_size
     52from waeup.kofa.widgets.datewidget import (
    5353    FriendlyDateWidget, FriendlyDateDisplayWidget,
    5454    FriendlyDatetimeDisplayWidget)
    55 from waeup.sirp.widgets.phonewidget import PhoneWidget
    56 from waeup.sirp.widgets.restwidget import ReSTDisplayWidget
    57 
    58 grok.context(ISIRPObject) # Make ISIRPObject the default context
    59 
    60 class ApplicantsRootPage(SIRPPage):
     55from waeup.kofa.widgets.phonewidget import PhoneWidget
     56from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
     57
     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(SIRPEditFormPage):
     72class ApplicantsRootManageFormPage(KOFAEditFormPage):
    7373    grok.context(IApplicantsRoot)
    7474    grok.name('manage')
     
    141141        return del_local_roles(self,3,**data)
    142142
    143 class ApplicantsContainerAddFormPage(SIRPAddFormPage):
     143class ApplicantsContainerAddFormPage(KOFAAddFormPage):
    144144    grok.context(IApplicantsRoot)
    145145    grok.require('waeup.manageApplication')
     
    215215        return self.context.p_id
    216216
    217 class ApplicantsContainerPage(SIRPDisplayFormPage):
     217class ApplicantsContainerPage(KOFADisplayFormPage):
    218218    """The standard view for regular applicant containers.
    219219    """
     
    232232    @property
    233233    def introduction(self):
    234         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    235         lang = self.request.cookies.get('sirp.language', portal_language)
     234        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     235        lang = self.request.cookies.get('kofa.language', portal_language)
    236236        html = self.context.description_dict.get(lang,'')
    237237        if html =='':
     
    246246        return "%s" % self.context.title
    247247
    248 class ApplicantsContainerManageFormPage(SIRPEditFormPage):
     248class ApplicantsContainerManageFormPage(KOFAEditFormPage):
    249249    grok.context(IApplicantsContainer)
    250250    grok.name('manage')
     
    349349        return del_local_roles(self,3,**data)
    350350
    351 class ApplicantAddFormPage(SIRPAddFormPage):
     351class ApplicantAddFormPage(KOFAAddFormPage):
    352352    """Add-form to add an applicant.
    353353    """
     
    372372        return
    373373
    374 class ApplicantDisplayFormPage(SIRPDisplayFormPage):
     374class ApplicantDisplayFormPage(KOFADisplayFormPage):
    375375    grok.context(IApplicant)
    376376    grok.name('index')
     
    484484
    485485
    486 class OnlinePaymentDisplayFormPage(SIRPDisplayFormPage):
     486class OnlinePaymentDisplayFormPage(KOFADisplayFormPage):
    487487    """ Page to view an online payment ticket
    488488    """
     
    524524        self.context.p_state = 'paid'
    525525        self.context.payment_date = datetime.now()
    526         ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
     526        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    527527        self.context.__parent__.loggerInfo(
    528528            ob_class, 'valid callback: %s' % self.context.p_id)
     
    547547    @property
    548548    def title(self):
    549         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    550         return translate(_('Payment Data'), 'waeup.sirp',
     549        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     550        return translate(_('Payment Data'), 'waeup.kofa',
    551551            target_language=portal_language)
    552552
    553553    @property
    554554    def label(self):
    555         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     555        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    556556        return translate(_('Online Payment Receipt'),
    557             'waeup.sirp', target_language=portal_language) \
     557            'waeup.kofa', target_language=portal_language) \
    558558            + ' %s' % self.context.p_id
    559559
     
    582582    #@property
    583583    #def label(self):
    584     #    portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     584    #    portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    585585    #    container_title = self.context.__parent__.title
    586586    #    label = translate('Application Record',
    587     #        'waeup.sirp', target_language=portal_language)
     587    #        'waeup.kofa', target_language=portal_language)
    588588    #    return container_title +  label + self.context.application_number
    589589
     
    638638    return True
    639639
    640 class ApplicantManageFormPage(SIRPEditFormPage):
     640class ApplicantManageFormPage(KOFAEditFormPage):
    641641    """A full edit view for applicant data.
    642642    """
     
    716716            self.wf_info.fireTransition(trans_id)
    717717        self.flash(_('Form has been saved.'))
    718         ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
     718        ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    719719        if fields_string:
    720720            self.context.loggerInfo(ob_class, 'saved: % s' % fields_string)
     
    748748            self.flash(_('Successfully removed: ${a}',
    749749                mapping = {'a':', '.join(deleted)}))
    750             ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
     750            ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')
    751751            self.context.loggerInfo(
    752752                ob_class, 'removed: % s' % ', '.join(deleted))
     
    883883        return image
    884884
    885 class ApplicantRegistrationPage(SIRPAddFormPage):
     885class ApplicantRegistrationPage(KOFAAddFormPage):
    886886    """Captcha'd registration page for applicants.
    887887    """
     
    926926        self.applyData(applicant, **data)
    927927        self.context.addApplicant(applicant)
    928         sirp_utils = getUtility(ISIRPUtils)
    929         password = sirp_utils.genPassword()
     928        kofa_utils = getUtility(IKOFAUtils)
     929        password = kofa_utils.genPassword()
    930930        IUserAccount(applicant).setPassword(password)
    931931        # Send email with credentials
    932932        login_url = self.url(grok.getSite(), 'login')
    933933        msg = _('You have successfully been registered for the')
    934         if sirp_utils.sendCredentials(IUserAccount(applicant),
     934        if kofa_utils.sendCredentials(IUserAccount(applicant),
    935935            password, login_url, msg):
    936936            self.redirect(self.url(self.context, 'registration_complete',
     
    941941        return
    942942
    943 class ApplicantRegistrationEmailSent(SIRPPage):
     943class ApplicantRegistrationEmailSent(KOFAPage):
    944944    """Landing page after successful registration.
    945945    """
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantdisplaypage.pt

    r7714 r7811  
    1111<img src="" tal:attributes="src view/passport_url" />
    1212
    13 <table i18n:domain="waeup.sirp" class="form-table">
     13<table i18n:domain="waeup.kofa" class="form-table">
    1414  <tbody>
    1515    <tal:block repeat="widget view/widgets">
     
    4141  </tbody>
    4242</table>
    43 <h3  i18n:domain="waeup.sirp" i18n:translate="">
     43<h3  i18n:domain="waeup.kofa" i18n:translate="">
    4444    Acceptance Fee Payment Tickets
    4545</h3>
    46 <table i18n:domain="waeup.sirp">
     46<table i18n:domain="waeup.kofa">
    4747  <thead>
    4848    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicanteditpage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <h2>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantregemailsent.pt

    r7710 r7811  
    1 <div i18n:domain="waeup.sirp">
     1<div i18n:domain="waeup.kofa">
    22  <p>
    33    <span i18n:translate=""> An email with your user name and password
     
    1010  </p>
    1111  <p  i18n:translate="">
    12     Thanks for using SIRP!
     12    Thanks for using Kofa!
    1313  </p>
    1414</div>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantregister.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2     i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2    i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontainermanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   i18n:domain="waeup.sirp" class="edit-form" enctype="multipart/form-data">
     2  i18n:domain="waeup.kofa" class="edit-form" enctype="multipart/form-data">
    33
    44  <ul class="tabs" data-tabs="tabs">
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootmanagepage.pt

    r7710 r7811  
    11<form action="." tal:attributes="action request/URL"
    2   i18n:domain="waeup.sirp" method="POST"  enctype="multipart/form-data">
     2  i18n:domain="waeup.kofa" method="POST"  enctype="multipart/form-data">
    33  <ul class="tabs" data-tabs="tabs">
    44    <li class="active">
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootpage.pt

    r7710 r7811  
    1 <table i18n:domain="waeup.sirp">
     1<table i18n:domain="waeup.kofa">
    22  <thead>
    33    <tr>
     
    1111    <tr tal:repeat="entry context/values" class="gradeC">
    1212      <td tal:content="entry/year">Year
    13       </td>     
     13      </td>
    1414      <td tal:content="entry/__name__">CODE
    1515      </td>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/container.py

    r7800 r7811  
    2323from zope.component.factory import Factory
    2424from zope.component.interfaces import IFactory
    25 from waeup.sirp.applicants.interfaces import (
     25from waeup.kofa.applicants.interfaces import (
    2626    IApplicantsContainer, IApplicantsContainerAdd,
    2727    IApplicantsContainerProvider, IApplicant
    2828    )
    29 from waeup.sirp.utils.helpers import attrs_to_fields
     29from waeup.kofa.utils.helpers import attrs_to_fields
    3030
    3131def generate_applicant_id(container=None):
     
    111111    """
    112112    grok.implements(IApplicantsContainerProvider)
    113     grok.name('waeup.sirp.applicants.ApplicantsContainer')
     113    grok.name('waeup.kofa.applicants.ApplicantsContainer')
    114114
    115115    #: The applicants container type this provider provides:
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/dynamicroles.py

    r7347 r7811  
    2424import grok
    2525from zope.securitypolicy.interfaces import IPrincipalRoleManager
    26 from waeup.sirp.applicants.interfaces import IApplicant
    27 from waeup.sirp.students.dynamicroles import StudentPrincipalRoleManager
     26from waeup.kofa.applicants.interfaces import IApplicant
     27from waeup.kofa.students.dynamicroles import StudentPrincipalRoleManager
    2828
    2929# All components in here have the same context: Applicant instances
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r7795 r7811  
    2727from zope.schema.interfaces import (
    2828    ValidationError, ISource, IContextSourceBinder)
    29 from waeup.sirp.schema import TextLineChoice
    30 from waeup.sirp.interfaces import (
    31     ISIRPObject, year_range, validate_email, academic_sessions_vocab)
    32 from waeup.sirp.interfaces import MessageFactory as _
    33 from waeup.sirp.payments.interfaces import IOnlinePayment
    34 from waeup.sirp.schoolgrades import ResultEntryField
    35 from waeup.sirp.students.vocabularies import (
     29from waeup.kofa.schema import TextLineChoice
     30from waeup.kofa.interfaces import (
     31    IKOFAObject, year_range, validate_email, academic_sessions_vocab)
     32from waeup.kofa.interfaces import MessageFactory as _
     33from waeup.kofa.payments.interfaces import IOnlinePayment
     34from waeup.kofa.schoolgrades import ResultEntryField
     35from waeup.kofa.students.vocabularies import (
    3636    lgas_vocab, CertificateSource, GenderSource)
    37 from waeup.sirp.university.vocabularies import (
     37from waeup.kofa.university.vocabularies import (
    3838    course_levels, AppCatSource)
    3939
     
    178178    pass
    179179
    180 class IApplicantsRoot(ISIRPObject, IContainer):
     180class IApplicantsRoot(IKOFAObject, IContainer):
    181181    """A container for university applicants containers.
    182182    """
    183183    pass
    184184
    185 class IApplicantsContainer(ISIRPObject):
     185class IApplicantsContainer(IKOFAObject):
    186186    """An applicants container contains university applicants.
    187187
     
    352352    'provider'].order =  IApplicantsContainer['provider'].order
    353353
    354 class IApplicantBaseData(ISIRPObject):
     354class IApplicantBaseData(IKOFAObject):
    355355    """The data for an applicant.
    356356
     
    361361
    362362    This base interface is also implemented by the
    363     :class:`waeup.sirp.students.StudentApplication` class in the
     363    :class:`waeup.kofa.students.StudentApplication` class in the
    364364    students package. Thus, these are the data which are saved after
    365365    admission.
     
    589589
    590590      import grok
    591       from waeup.sirp.applicants.interfaces import IApplicantsContainerProvider
     591      from waeup.kofa.applicants.interfaces import IApplicantsContainerProvider
    592592
    593593      class MyContainerProvider(grok.GlobalUtility):
     
    601601
    602602      >>> from zope.component import getAllUtilitiesRegisteredFor
    603       >>> from waeup.sirp.applicants.interfaces import (
     603      >>> from waeup.kofa.applicants.interfaces import (
    604604      ...     IApplicantsContainerProvider)
    605605      >>> all_providers = getAllUtilitiesRegisteredFor(
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py

    r7255 r7811  
    2222from zope.component.interfaces import IFactory
    2323from zope.interface import implementedBy
    24 from waeup.sirp.payments import OnlinePayment
    25 from waeup.sirp.applicants.interfaces import IApplicantOnlinePayment
    26 from waeup.sirp.utils.helpers import attrs_to_fields
     24from waeup.kofa.payments import OnlinePayment
     25from waeup.kofa.applicants.interfaces import IApplicantOnlinePayment
     26from waeup.kofa.utils.helpers import attrs_to_fields
    2727
    2828class ApplicantOnlinePayment(OnlinePayment):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py

    r7804 r7811  
    3232from zope.formlib.form import setUpEditWidgets
    3333from zope.publisher.browser import TestRequest
    34 from waeup.sirp.applicants.interfaces import IApplicant
    35 from waeup.sirp.browser import DEFAULT_PASSPORT_IMAGE_PATH
    36 from waeup.sirp.interfaces import IExtFileStore, IPDF, ISIRPUtils
    37 from waeup.sirp.interfaces import MessageFactory as _
     34from waeup.kofa.applicants.interfaces import IApplicant
     35from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH
     36from waeup.kofa.interfaces import IExtFileStore, IPDF, IKOFAUtils
     37from waeup.kofa.interfaces import MessageFactory as _
    3838
    3939SLIP_STYLE = TableStyle(
     
    5454    def title(self):
    5555        container_title = self.context.__parent__.title
    56         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     56        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    5757        ar_translation = translate(_('Application Record'),
    58             'waeup.sirp', target_language=portal_language)
     58            'waeup.kofa', target_language=portal_language)
    5959        return '%s - %s %s' % (container_title,
    6060            ar_translation, self.context.application_number)
     
    107107        if dept is None:
    108108            return data
    109         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     109        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    110110        dp_translation = translate(_('Department:'),
    111             'waeup.sirp', target_language=portal_language)
     111            'waeup.kofa', target_language=portal_language)
    112112        f_label = '<font size=12>%s</font>' % dp_translation
    113113        f_text = '<font size=12>%s</font>' % dept.longtitle()
     
    120120            return data
    121121        fc_translation = translate(_('Faculty:'),
    122             'waeup.sirp', target_language=portal_language)
     122            'waeup.kofa', target_language=portal_language)
    123123        f_label = '<font size=12>%s</font>' % fc_translation
    124124        f_text = '<font size=12>%s</font>' % faculty.longtitle()
     
    145145            pdf.setAuthor('%s (%s)' % (view.request.principal.title,
    146146                view.request.principal.id))
    147         pdf.setCreator('SIRP')
     147        pdf.setCreator('KOFA')
    148148        width, height = A4
    149149        style = getSampleStyleSheet()
     
    171171        # Render widget fields
    172172        widgets = self._setUpWidgets()
    173         portal_language = getUtility(ISIRPUtils).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(
    176                 widget.label.strip(), 'waeup.sirp',
     176                widget.label.strip(), 'waeup.kofa',
    177177                target_language=portal_language)
    178178            f_label = Paragraph(f_label, style["Normal"])
     
    184184            data.append([f_label,f_text])
    185185        adm_translation = translate(_('Admitted Course of Study:'),
    186                 'waeup.sirp', target_language=portal_language)
     186                'waeup.kofa', target_language=portal_language)
    187187        f_label = '<font size=12>%s</font>' % adm_translation
    188188        f_text = '<font size=12>%s</font>' % (
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/root.py

    r7652 r7811  
    2323from hurry.query.interfaces import IQuery
    2424from zope.component import getUtility
    25 from waeup.sirp.interfaces import ISIRPPluggable
    26 from waeup.sirp.applicants.interfaces import IApplicantsRoot
    27 from waeup.sirp.utils.logger import Logger
     25from waeup.kofa.interfaces import IKOFAPluggable
     26from waeup.kofa.applicants.interfaces import IApplicantsRoot
     27from waeup.kofa.utils.logger import Logger
    2828
    2929class ApplicantsRoot(grok.Container, Logger):
     
    3535    local_roles = []
    3636
    37     logger_name = 'waeup.sirp.${sitename}.applicants'
     37    logger_name = 'waeup.kofa.${sitename}.applicants'
    3838    logger_filename = 'applicants.log'
    3939
     
    4646
    4747class ApplicantsPlugin(grok.GlobalUtility):
    48     """A SIRPPlugin 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
    51     `waeup.sirp.app.Universtiy` instance on creation time. The
     51    `waeup.kofa.app.Universtiy` instance on creation time. The
    5252    :meth:`update` method normally can also be triggered manually over
    5353    the main site configuration.
    5454
    55     Implements :class:`waeup.sirp.interfaces.ISIRPPluggable`
     55    Implements :class:`waeup.kofa.interfaces.IKOFAPluggable`
    5656    """
    5757    grok.name('applicants')
    58     grok.implements(ISIRPPluggable)
     58    grok.implements(IKOFAPluggable)
    5959    log_prefix = 'ApplicantsPlugin'
    6060
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_container_data.csv

    r6281 r7811  
    11code,ac_prefix,application_category,provider,prefix,year
    2 CODE1,APP,basic,waeup.sirp.applicants.ApplicantsContainer,app,2013
    3 CODE2,DPP,cest,waeup.sirp.applicants.ApplicantsContainer,app,2013
     2CODE1,APP,basic,waeup.kofa.applicants.ApplicantsContainer,app,2013
     3CODE2,DPP,cest,waeup.kofa.applicants.ApplicantsContainer,app,2013
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py

    r7321 r7811  
    2626from zope.interface import verify, implements
    2727from zope.location.interfaces import ILocation
    28 from waeup.sirp.image.interfaces import ISIRPImageFile
    29 from waeup.sirp.imagestorage import DefaultStorage
    30 from waeup.sirp.interfaces import IFileStoreHandler, IFileStoreNameChooser
    31 from waeup.sirp.applicants import (
     28from waeup.kofa.image.interfaces import IKOFAImageFile
     29from waeup.kofa.imagestorage import DefaultStorage
     30from waeup.kofa.interfaces import IFileStoreHandler, IFileStoreNameChooser
     31from waeup.kofa.applicants import (
    3232    Applicant, ApplicantFactory,
    3333    ApplicantImageStoreHandler, ApplicantImageNameChooser,
    3434    )
    35 from waeup.sirp.applicants.interfaces import IApplicant
    36 from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
     35from waeup.kofa.applicants.interfaces import IApplicant
     36from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
    3737
    3838class FakeImageLocation(object):
    3939    implements(ILocation)
    40     adapts(ISIRPImageFile)
     40    adapts(IKOFAImageFile)
    4141    def __init__(self, context):
    4242        pass
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py

    r7421 r7811  
    2222from hurry.workflow.interfaces import IWorkflowInfo
    2323from zope.component import getUtility
    24 from waeup.sirp.testing import FunctionalLayer
    25 from waeup.sirp.interfaces import IExtFileStore, IFileStoreNameChooser
    26 from waeup.sirp.applicants.tests.test_browser import ApplicantsFullSetup
     24from waeup.kofa.testing import FunctionalLayer
     25from waeup.kofa.interfaces import IExtFileStore, IFileStoreNameChooser
     26from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
    2727
    2828class ApplicantCopierFunctionalTests(ApplicantsFullSetup):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_authentication.py

    r7364 r7811  
    2525from zope.securitypolicy.role import Role
    2626from zope.securitypolicy.interfaces import IRole, Allow
    27 from waeup.sirp.authentication import get_principal_role_manager
    28 from waeup.sirp.interfaces import IAuthPluginUtility, IUserAccount
    29 from waeup.sirp.applicants.authentication import (
     27from waeup.kofa.authentication import get_principal_role_manager
     28from waeup.kofa.interfaces import IAuthPluginUtility, IUserAccount
     29from waeup.kofa.applicants.authentication import (
    3030    ApplicantsAuthenticatorSetup, ApplicantAccount)
    31 from waeup.sirp.applicants.tests.test_browser import ApplicantsFullSetup
    32 from waeup.sirp.testing import FunctionalLayer
     31from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
     32from waeup.kofa.testing import FunctionalLayer
    3333
    3434class ApplicantsAuthenticatorSetupTests(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py

    r7509 r7811  
    2727from zope.interface.verify import verifyClass, verifyObject
    2828
    29 from waeup.sirp.app import University
    30 from waeup.sirp.applicants.batching import (
     29from waeup.kofa.app import University
     30from waeup.kofa.applicants.batching import (
    3131    ApplicantsContainerImporter, ApplicantImporter)
    32 from waeup.sirp.applicants.container import ApplicantsContainer
    33 from waeup.sirp.applicants.applicant import Applicant
    34 from waeup.sirp.university.faculty import Faculty
    35 from waeup.sirp.university.department import Department
    36 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    37 from waeup.sirp.interfaces import IBatchProcessor
     32from waeup.kofa.applicants.container import ApplicantsContainer
     33from waeup.kofa.applicants.applicant import Applicant
     34from waeup.kofa.university.faculty import Faculty
     35from waeup.kofa.university.department import Department
     36from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     37from waeup.kofa.interfaces import IBatchProcessor
    3838
    3939
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r7795 r7811  
    2929from zope.testbrowser.testing import Browser
    3030from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    31 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    32 from waeup.sirp.app import University
    33 from waeup.sirp.configuration import SessionConfiguration
    34 from waeup.sirp.applicants.container import ApplicantsContainer
    35 from waeup.sirp.applicants.applicant import Applicant
    36 from waeup.sirp.interfaces import (
     31from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     32from waeup.kofa.app import University
     33from waeup.kofa.configuration import SessionConfiguration
     34from waeup.kofa.applicants.container import ApplicantsContainer
     35from waeup.kofa.applicants.applicant import Applicant
     36from waeup.kofa.interfaces import (
    3737    IExtFileStore, IFileStoreNameChooser, IUserAccount)
    38 from waeup.sirp.university.faculty import Faculty
    39 from waeup.sirp.university.department import Department
     38from waeup.kofa.university.faculty import Faculty
     39from waeup.kofa.university.department import Department
    4040
    4141PH_LEN = 2059  # Length of placeholder file
     
    247247        self.browser.getControl(name="form.year").value = ['2010']
    248248        self.browser.getControl(name="form.provider").value = [
    249             'waeup.sirp.applicants.ApplicantsContainer']
     249            'waeup.kofa.applicants.ApplicantsContainer']
    250250        self.browser.getControl(
    251251            name="form.application_category").value = ['basic']
     
    262262        self.browser.getControl(name="form.year").value = ['2010']
    263263        self.browser.getControl(name="form.provider").value = [
    264             'waeup.sirp.applicants.ApplicantsContainer']
     264            'waeup.kofa.applicants.ApplicantsContainer']
    265265        self.browser.getControl(
    266266            name="form.application_category").value = ['basic']
     
    277277        self.browser.getControl(name="form.year").value = ['2010']
    278278        self.browser.getControl(name="form.provider").value = [
    279             'waeup.sirp.applicants.ApplicantsContainer']
     279            'waeup.kofa.applicants.ApplicantsContainer']
    280280        #self.browser.getControl(name="form.ac_prefix").value = ['APP']
    281281        self.browser.getControl(
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_catalog.py

    r7260 r7811  
    2828from zope.component.interfaces import ComponentLookupError
    2929from zope.testbrowser.testing import Browser
    30 from waeup.sirp.app import University
    31 from waeup.sirp.applicants.container import ApplicantsContainer
    32 from waeup.sirp.applicants.applicant import Applicant
    33 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
     30from waeup.kofa.app import University
     31from waeup.kofa.applicants.container import ApplicantsContainer
     32from waeup.kofa.applicants.applicant import Applicant
     33from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
    3434
    3535class CatalogTests(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_container.py

    r7193 r7811  
    2121import unittest
    2222from zope.interface.verify import verifyClass, verifyObject
    23 from waeup.sirp.applicants import interfaces
    24 from waeup.sirp.applicants.container import (
     23from waeup.kofa.applicants import interfaces
     24from waeup.kofa.applicants.container import (
    2525    ApplicantsContainer,
    2626    )
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_dynamicroles.py

    r7347 r7811  
    2424from zope.securitypolicy.tests.test_annotationprincipalrolemanager import (
    2525    Test as APRMTest, Manageable)
    26 from waeup.sirp.testing import FunctionalLayer
    27 from waeup.sirp.applicants.tests.test_browser import ApplicantsFullSetup
    28 from waeup.sirp.applicants import ApplicantPrincipalRoleManager
     26from waeup.kofa.testing import FunctionalLayer
     27from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
     28from waeup.kofa.applicants import ApplicantPrincipalRoleManager
    2929
    3030class ApplicantPrincipalRoleManagerTests(APRMTest):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_interfaces.py

    r7683 r7811  
    2222from zc.sourcefactory.browser.source import FactoredTerms
    2323from zope.publisher.browser import TestRequest
    24 from waeup.sirp.applicants.interfaces import ApplicationTypeSource
    25 from waeup.sirp.students.vocabularies import GenderSource
     24from waeup.kofa.applicants.interfaces import ApplicationTypeSource
     25from waeup.kofa.students.vocabularies import GenderSource
    2626
    2727class InterfacesTest(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_payment.py

    r7250 r7811  
    2020"""
    2121
    22 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    23 from waeup.sirp.applicants.payment import (
     22from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     23from waeup.kofa.applicants.payment import (
    2424    ApplicantOnlinePayment, ApplicantOnlinePaymentFactory)
    25 from waeup.sirp.payments.interfaces import IOnlinePayment
     25from waeup.kofa.payments.interfaces import IOnlinePayment
    2626
    2727class ApplicantOnlinePaymentFactoryTest(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_pdf.py

    r7416 r7811  
    2222from zope.component import getAdapter
    2323from zope.interface import verify
    24 from waeup.sirp.applicants.pdf import IPDF, PDFApplicationSlip
    25 from waeup.sirp.applicants.tests.test_browser import ApplicantsFullSetup
    26 from waeup.sirp.interfaces import IPDF
    27 from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
     24from waeup.kofa.applicants.pdf import IPDF, PDFApplicationSlip
     25from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
     26from waeup.kofa.interfaces import IPDF
     27from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
    2828
    2929class PDFApplicationSlipTests(ApplicantsFullSetup):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_root.py

    r7375 r7811  
    2626from zope.component.hooks import setSite, clearSite
    2727from zope.interface.verify import verifyClass, verifyObject
    28 from waeup.sirp.app import University
    29 from waeup.sirp.applicants import (
     28from waeup.kofa.app import University
     29from waeup.kofa.applicants import (
    3030    interfaces, Applicant, ApplicantsContainer,
    3131    )
    32 from waeup.sirp.applicants.root import (
     32from waeup.kofa.applicants.root import (
    3333    ApplicantsRoot, ApplicantsPlugin,
    3434    )
    35 from waeup.sirp.testing import (
     35from waeup.kofa.testing import (
    3636    FunctionalLayer, FunctionalTestCase, remove_logger)
    3737
     
    4545
    4646    def setUp(self):
    47         remove_logger('waeup.sirp.app.applicants')
     47        remove_logger('waeup.kofa.app.applicants')
    4848        super(ApplicantsRootTestCase, self).setUp()
    4949        # Setup a sample site for each test
     
    7979        logger = self.app['applicants'].logger
    8080        assert logger is not None
    81         assert logger.name == 'waeup.sirp.app.applicants'
     81        assert logger.name == 'waeup.kofa.app.applicants'
    8282        handlers = logger.handlers
    8383        assert len(handlers) == 1
     
    9393        logger = self.app['applicants'].logger
    9494        assert logger is not None
    95         assert logger.name == 'waeup.sirp.app.applicants'
     95        assert logger.name == 'waeup.kofa.app.applicants'
    9696        handlers = logger.handlers
    9797        assert len(handlers) == 1
     
    103103    def create_logger(self):
    104104        # create a logger suitable for local tests.
    105         test_logger = logging.getLogger('waeup.sirp.applicants.testlogger')
     105        test_logger = logging.getLogger('waeup.kofa.applicants.testlogger')
    106106        log = StringIO()
    107107        handler = logging.StreamHandler(log)
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py

    r7682 r7811  
    2020
    2121import grok
    22 from waeup.sirp.applicants.interfaces import IApplicantsUtils
     22from waeup.kofa.applicants.interfaces import IApplicantsUtils
    2323
    2424class ApplicantsUtils(grok.GlobalUtility):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/viewlets.py

    r7714 r7811  
    1818import grok
    1919from hurry.workflow.interfaces import IWorkflowState
    20 from waeup.sirp.interfaces import ISIRPObject
    21 from waeup.sirp.students.viewlets import PrimaryStudentNavTab
    22 from waeup.sirp.browser.viewlets import ManageActionButton, PrimaryNavTab
    23 from waeup.sirp.applicants.interfaces import (
     20from waeup.kofa.interfaces import IKOFAObject
     21from waeup.kofa.students.viewlets import PrimaryStudentNavTab
     22from waeup.kofa.browser.viewlets import ManageActionButton, PrimaryNavTab
     23from waeup.kofa.applicants.interfaces import (
    2424    IApplicant, IApplicantsRoot, IApplicantsContainer,
    2525    IApplicantOnlinePayment,
    2626    )
    27 from waeup.sirp.applicants.browser import (
     27from waeup.kofa.applicants.browser import (
    2828    ApplicantsRootPage, ApplicantsContainerPage, ApplicantManageFormPage,
    2929    ApplicantDisplayFormPage, OnlinePaymentDisplayFormPage
    3030    )
    3131
    32 from waeup.sirp.interfaces import MessageFactory as _
     32from waeup.kofa.interfaces import MessageFactory as _
    3333
    34 grok.context(ISIRPObject) # Make ISIRPObject 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(ISIRPObject)
     40    grok.context(IKOFAObject)
    4141    grok.order(3)
    4242    grok.require('waeup.viewApplicantsTab')
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/workflow.py

    r7690 r7811  
    2121from hurry.workflow.workflow import Transition, WorkflowState, NullCondition
    2222from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
    23 from waeup.sirp.applicants.interfaces import IApplicantBaseData
    24 from waeup.sirp.interfaces import IObjectHistory, ISIRPWorkflowInfo, ISIRPUtils
    25 from waeup.sirp.interfaces import MessageFactory as _
    26 from waeup.sirp.workflow import SIRPWorkflow, SIRPWorkflowInfo
     23from waeup.kofa.applicants.interfaces import IApplicantBaseData
     24from waeup.kofa.interfaces import IObjectHistory, IKOFAWorkflowInfo, IKOFAUtils
     25from waeup.kofa.interfaces import MessageFactory as _
     26from waeup.kofa.workflow import KOFAWorkflow, KOFAWorkflowInfo
    2727
    2828INITIALIZED = 'initialized'
     
    137137    )
    138138
    139 application_workflow = SIRPWorkflow(APPLICATION_TRANSITIONS)
     139application_workflow = KOFAWorkflow(APPLICATION_TRANSITIONS)
    140140
    141141class ApplicationWorkflowState(WorkflowState, grok.Adapter):
     
    148148    state_id = 'wf.application.id'
    149149
    150 class ApplicationWorkflowInfo(SIRPWorkflowInfo, 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(ISIRPWorkflowInfo)
     154    grok.provides(IKOFAWorkflowInfo)
    155155
    156156    def __init__(self, context):
  • main/waeup.kofa/trunk/src/waeup/kofa/authentication.py

    r7658 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Authentication for SIRP.
     18"""Authentication for KOFA.
    1919"""
    2020import grok
     
    3232from zope.password.interfaces import IPasswordManager
    3333from zope.securitypolicy.principalrole import principalRoleManager
    34 from waeup.sirp.interfaces import (ILocalRoleSetEvent,
     34from waeup.kofa.interfaces import (ILocalRoleSetEvent,
    3535    IUserAccount, IAuthPluginUtility, IPasswordValidator,
    36     ISIRPPrincipal, ISIRPPrincipalInfo)
     36    IKOFAPrincipal, IKOFAPrincipalInfo)
    3737
    3838def setup_authentication(pau):
     
    6363    return principalRoleManager
    6464
    65 class SIRPSessionCredentialsPlugin(grok.GlobalUtility,
     65class KOFASessionCredentialsPlugin(grok.GlobalUtility,
    6666                                    SessionCredentialsPlugin):
    6767    grok.provides(ICredentialsPlugin)
     
    7272    passwordfield = 'form.password'
    7373
    74 class SIRPPrincipalInfo(object):
    75     """An implementation of ISIRPPrincipalInfo.
    76 
    77     A SIRP 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(ISIRPPrincipalInfo)
     80    grok.implements(IKOFAPrincipalInfo)
    8181
    8282    def __init__(self, id, title, description, email, phone, user_type):
     
    9090        self.authenticatorPlugin = None
    9191
    92 class SIRPPrincipal(Principal):
     92class KOFAPrincipal(Principal):
    9393    """A portal principal.
    9494
    95     SIRP 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(ISIRPPrincipal)
     99    grok.implements(IKOFAPrincipal)
    100100
    101101    def __init__(self, id, title=u'', description=u'', email=u'',
     
    112112
    113113    def __repr__(self):
    114         return 'SIRPPrincipal(%r)' % self.id
    115 
    116 class AuthenticatedSIRPPrincipalFactory(grok.MultiAdapter):
    117     """Creates 'authenticated' SIRP principals.
    118 
    119     Adapts (principal info, request) to a SIRPPrincipal 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     SIRPPrincipalInfos into SIRPPrincipal instances.
    123     """
    124     grok.adapts(ISIRPPrincipalInfo, 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 = SIRPPrincipal(
     132        principal = KOFAPrincipal(
    133133            self.info.id,
    134134            self.info.title,
     
    224224        if not account.checkPassword(credentials['password']):
    225225            return None
    226         return SIRPPrincipalInfo(
     226        return KOFAPrincipalInfo(
    227227            id=account.name,
    228228            title=account.title,
     
    236236        if account is None:
    237237            return None
    238         return SIRPPrincipalInfo(
     238        return KOFAPrincipalInfo(
    239239            id=account.name,
    240240            title=account.title,
  • main/waeup.kofa/trunk/src/waeup/kofa/authentication.txt

    r7636 r7811  
    1 SIRP authentication
     1KOFA authentication
    22*******************
    33
     
    1111
    1212  >>> from zope.component.hooks import setSite # only needed in tests
    13   >>> from waeup.sirp.app import University
     13  >>> from waeup.kofa.app import University
    1414  >>> root = getRootFolder()
    1515  >>> u = University()
     
    3636user credentials and some metadata persistently:
    3737
    38   >>> from waeup.sirp.authentication import Account
     38  >>> from waeup.kofa.authentication import Account
    3939  >>> alice = Account('alice', 'alicesecret',roles=['waeup.ManageDataCenter'])
    4040  >>> root['app']['users'].addAccount(alice)
     
    4949
    5050  >>> alice.getLocalRoles()
    51   {'waeup.local.Owner': [<waeup.sirp.authentication.Account object at 0x...>]}
     51  {'waeup.local.Owner': [<waeup.kofa.authentication.Account object at 0x...>]}
    5252
    5353User  automatically get the global AcademicsOfficer role:
     
    7171  >>> alice.notifyLocalRoleChanged(chalet, 'BigBoss', granted=False)
    7272  >>> alice.getLocalRoles()
    73   {'waeup.local.Owner': [<waeup.sirp.authentication.Account object at 0x...>]}
     73  {'waeup.local.Owner': [<waeup.kofa.authentication.Account object at 0x...>]}
    7474
    7575We can also use events to trigger such actions. This is recommended
    7676because we do not neccessarily know where Alice lives:
    7777
    78   >>> from waeup.sirp.authentication import LocalRoleSetEvent
     78  >>> from waeup.kofa.authentication import LocalRoleSetEvent
    7979  >>> from zope.event import notify
    8080  >>> notify(LocalRoleSetEvent(chalet, 'BigBoss', 'alice',
     
    9292
    9393   >>> from zope.securitypolicy.interfaces import IPrincipalRoleManager
    94    >>> from waeup.sirp.university.faculty import Faculty
     94   >>> from waeup.kofa.university.faculty import Faculty
    9595   >>> faculty = Faculty()
    9696   >>> root['app']['bobs_fac'] = faculty
     
    105105   >>> bob = root['app']['users']['bob']
    106106   >>> bob.getLocalRoles()
    107    {'waeup.PortalManager': [<waeup.sirp...Faculty object at 0x...>]}
     107   {'waeup.PortalManager': [<waeup.kofa...Faculty object at 0x...>]}
    108108
    109109When we delete the faculty from ZODB, also Bobs roles are modified:
     
    111111   >>> del root['app']['bobs_fac']
    112112   >>> bob.getLocalRoles()
    113    {'waeup.local.Owner': [<waeup.sirp.authentication.Account object at 0x...>]}
     113   {'waeup.local.Owner': [<waeup.kofa.authentication.Account object at 0x...>]}
    114114
    115115If one notifies the machinery of a local role removal for an object
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/__init__.py

    r7321 r7811  
    11import os
    22
    3 from waeup.sirp.browser.layout import (
    4     SIRPPage, SIRPForm, SIRPLayout, SIRPDisplayFormPage, SIRPEditFormPage,
    5     SIRPAddFormPage, NullValidator)
    6 from waeup.sirp.browser.pages import ContactAdminForm
     3from waeup.kofa.browser.layout import (
     4    KOFAPage, KOFAForm, KOFALayout, KOFADisplayFormPage, KOFAEditFormPage,
     5    KOFAAddFormPage, NullValidator)
     6from waeup.kofa.browser.pages import ContactAdminForm
    77
    88IMAGE_PATH = os.path.join(
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt

    r7749 r7811  
    2121Create a site:
    2222
    23     >>> from waeup.sirp.app import University
     23    >>> from waeup.kofa.app import University
    2424    >>> getRootFolder()['app'] = University()
    2525
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.py

    r7700 r7811  
    2323from zope.publisher.browser import TestRequest
    2424
    25 from waeup.sirp.interfaces import (
     25from waeup.kofa.interfaces import (
    2626    IConfigurationContainer, ISessionConfiguration)
    27 from waeup.sirp.interfaces import MessageFactory as _
    28 from waeup.sirp.browser import interfaces
    29 from waeup.sirp.browser.interfaces import (IBreadcrumb,
     27from waeup.kofa.interfaces import MessageFactory as _
     28from waeup.kofa.browser import interfaces
     29from waeup.kofa.browser.interfaces import (IBreadcrumb,
    3030    IBreadcrumbIgnorable, IBreadcrumbContainer)
    31        
     31
    3232class Breadcrumb(grok.Adapter):
    3333    """A most general breadcrumb generator.
    3434    """
    3535    grok.provides(IBreadcrumb)
    36     grok.context(interfaces.ISIRPObject)
     36    grok.context(interfaces.IKOFAObject)
    3737    grok.name('index')
    3838
     
    4242    parent_viewname = 'index'
    4343    viewname = 'index'
    44    
     44
    4545    def __init__(self, context):
    4646        """Turn a context into a breadcrumb.
     
    5757            return self.context.title
    5858        if hasattr(self.context, 'name'):
    59             return self.context.name           
     59            return self.context.name
    6060        return None
    6161
     
    151151class DataCenterBreadcrumb(Breadcrumb):
    152152    """A breadcrumb for data centers.
    153     """ 
     153    """
    154154    grok.context(interfaces.IDataCenter)
    155155    title = _(u'Data Center')
     
    160160    """
    161161    grok.context(interfaces.IFaculty)
    162    
     162
    163163    @property
    164164    def title(self):
     
    169169    """
    170170    grok.context(interfaces.IDepartment)
    171    
     171
    172172class CourseBreadcrumb(FacultyBreadcrumb):
    173173    """A breadcrumb for courses.
    174174    """
    175     grok.context(interfaces.ICourse)   
    176    
     175    grok.context(interfaces.ICourse)
     176
    177177class CertificateBreadcrumb(FacultyBreadcrumb):
    178178    """A breadcrumb for certificates.
    179179    """
    180     grok.context(interfaces.ICertificate)       
     180    grok.context(interfaces.ICertificate)
    181181
    182182class CoursesContainerBreadcrumb(Breadcrumb):
     
    245245
    246246    _breadcrumbs = None
    247    
     247
    248248    def __init__(self, context):
    249249        self.context = context
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.txt

    r7172 r7811  
    1111We create a university to check the breadcrumb functionality.
    1212
    13     >>> from waeup.sirp.app import University
     13    >>> from waeup.kofa.app import University
    1414    >>> root = getRootFolder()
    1515    >>> root['app'] = University()
     
    2222viewname:
    2323
    24     >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbList
     24    >>> from waeup.kofa.browser.breadcrumbs import getBreadcrumbList
    2525    >>> blist1 = getBreadcrumbList(app, 'index')
    2626    >>> blist1
    27     [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
     27    [<waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
    2828
    2929A slightly more extensive list for the datacenter:
     
    3232    >>> from pprint import pprint
    3333    >>> pprint(blist2)
    34     [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,
    35      <waeup.sirp.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,
    36      <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]
     34    [<waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,
     35     <waeup.kofa.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,
     36     <waeup.kofa.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]
    3737
    3838We get a breadcrumb for university, administration area and data
     
    4747
    4848     >>> pprint([(x.context, x.viewname) for x in blist2])
    49      [(<waeup.sirp.app.University object at 0x...>, 'index'),
    50       (<waeup.sirp.app.University object at 0x...>, 'administration'),
    51       (<waeup.sirp.datacenter.DataCenter object at 0x...>, 'index')]
     49     [(<waeup.kofa.app.University object at 0x...>, 'index'),
     50      (<waeup.kofa.app.University object at 0x...>, 'administration'),
     51      (<waeup.kofa.datacenter.DataCenter object at 0x...>, 'index')]
    5252
    5353The administration area breadcrumb might be a surprise, as there is no
     
    8989Now we can get the breadcrumbs for this view:
    9090
    91     >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbListForView
     91    >>> from waeup.kofa.browser.breadcrumbs import getBreadcrumbListForView
    9292    >>> blist3 = getBreadcrumbListForView(page)
    9393    >>> [x.title for x in blist3]
     
    109109The returned breadcrumb container supports iteration:
    110110
    111     >>> from waeup.sirp.browser.interfaces import IBreadcrumbContainer
     111    >>> from waeup.kofa.browser.interfaces import IBreadcrumbContainer
    112112    >>> mybccontainer = IBreadcrumbContainer(page)
    113113    >>> [x.title for x in mybccontainer]
     
    131131
    132132    >>> from zope.component import getAdapter
    133     >>> from waeup.sirp.browser.interfaces import IBreadcrumb
     133    >>> from waeup.kofa.browser.interfaces import IBreadcrumb
    134134    >>> b1 = getAdapter(app, IBreadcrumb, 'index')
    135135    >>> b1
    136     <waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
     136    <waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
    137137
    138138Breadcrumb objects provide a title:
     
    156156    >>> b2 = getAdapter(app['datacenter'], IBreadcrumb, 'index')
    157157    >>> b2
    158     <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
     158    <waeup.kofa.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
    159159
    160160    >>> b2.title
     
    168168
    169169    >>> b2.parent
    170     (<waeup.sirp.app.University object at 0x...>, 'administration')
     170    (<waeup.kofa.app.University object at 0x...>, 'administration')
    171171
    172172This result denotes a new context object (the University instance we
     
    184184    >>> b3 = getAdapter(context, IBreadcrumb, viewname)
    185185    >>> b3
    186     <waeup.sirp...breadcrumbs.AdministrationBreadcrumb object at 0x...>
     186    <waeup.kofa...breadcrumbs.AdministrationBreadcrumb object at 0x...>
    187187
    188188As you can see, we get an AdministrationBreadcrumb, although the
     
    197197    >>> context, viewname = b3.parent
    198198    >>> context, viewname
    199     (<waeup.sirp.app.University object at 0x...>, 'index')
     199    (<waeup.kofa.app.University object at 0x...>, 'index')
    200200
    201201We create last breadcrumb:
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt

    r7707 r7811  
    1 Browsing SIRP
     1Browsing KOFA
    22*************
    33
    4 Here we visit all parts of a SIRP portal using a browser.
     4Here we visit all parts of a KOFA portal using a browser.
    55
    66University
     
    1515  []
    1616
    17   >>> from waeup.sirp.app import University
     17  >>> from waeup.kofa.app import University
    1818  >>> u = University()
    1919  >>> root['myuniversity'] = u
     
    3535  >>> print browser.contents
    3636  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    37   ...Welcome to WAeUP.SIRP...
     37  ...Welcome to WAeUP.KOFA...
    3838  ...
    3939
     
    566566Courses are stored in :class:`ICoursesContainer` instances with their
    567567code as key. CoursesContainers are normally availabe as `course`
    568 attribute of :class:`waeup.sirp.university.department.Department`
     568attribute of :class:`waeup.kofa.university.department.Department`
    569569instances.
    570570
     
    769769with their code as key. CertificatesContainers are normally availabe as
    770770`certificates` attribute of
    771 :class:`waeup.sirp.university.department.Department` instances.
     771:class:`waeup.kofa.university.department.Department` instances.
    772772
    773773To ease the life of users we do not require to browse the
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py

    r7320 r7811  
    2828from zope.interface import Interface
    2929from zope.publisher.interfaces.http import IHTTPRequest
    30 from waeup.sirp.browser import SIRPPage
    31 from waeup.sirp.browser.interfaces import (
     30from waeup.kofa.browser import KOFAPage
     31from waeup.kofa.browser.interfaces import (
    3232    ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig,
    3333    ICaptchaManager)
    34 from waeup.sirp.interfaces import IUniversity
     34from waeup.kofa.interfaces import IUniversity
    3535
    3636#
     
    171171    """ReCaptcha - strong captchas with images, sound, etc.
    172172
    173     This is the SIRP 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 SIRP",
     268                "User-agent": "reCAPTCHA Python KOFA",
    269269                }
    270270            )
     
    319319
    320320
    321 class CaptchaTestPage(SIRPPage):
     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

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

    r7333 r7811  
    2020from zope import schema
    2121from zope.interface import Interface, Attribute
    22 from waeup.sirp.interfaces import (
    23     ISIRPObject, IUniversity, IUsersContainer, IDataCenter)
    24 from waeup.sirp.university.interfaces import (
     22from waeup.kofa.interfaces import (
     23    IKOFAObject, IUniversity, IUsersContainer, IDataCenter)
     24from waeup.kofa.university.interfaces import (
    2525    IFacultiesContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd,
    2626    ICoursesContainer, ICourse, ICourseAdd, ICertificatesContainer,
     
    6363    Themes are basically collections of CSS- and/or JavaScript files
    6464    stored somewhere. In Grok-contexts these files can be registered
    65     as 'resources' (see :mod:`waeup.sirp.browser.resources`).
     65    as 'resources' (see :mod:`waeup.kofa.browser.resources`).
    6666
    6767    Furthermore, to make themes selectable and distinctable from each
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py

    r7700 r7811  
    3333from zope.interface import Interface
    3434from zope.site.hooks import getSite
    35 from waeup.sirp.interfaces import ISIRPObject, IUserAccount
    36 from waeup.sirp.browser.interfaces import ITheme
    37 from waeup.sirp.browser.theming import get_all_themes, SIRPThemeBase
    38 from waeup.sirp.students.interfaces import IStudentNavigation
    39 from waeup.sirp.applicants.interfaces import IApplicant
    40 from waeup.sirp.authentication import get_principal_role_manager
     35from waeup.kofa.interfaces import IKOFAObject, IUserAccount
     36from waeup.kofa.browser.interfaces import ITheme
     37from waeup.kofa.browser.theming import get_all_themes, KOFAThemeBase
     38from waeup.kofa.students.interfaces import IStudentNavigation
     39from waeup.kofa.applicants.interfaces import IApplicant
     40from waeup.kofa.authentication import get_principal_role_manager
    4141
    4242grok.templatedir('templates')
     
    5656
    5757    def __call__(self, success):
    58         action = SIRPAction(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 SIRPAction(Action):
     62class KOFAAction(Action):
    6363
    6464    def __init__(self, label, style='', **options):
    65         super(SIRPAction, self).__init__(label, **options)
     65        super(KOFAAction, self).__init__(label, **options)
    6666        self.style = style
    6767
     
    150150        return True
    151151
    152 class SIRPLayout(UtilityView,Layout):
     152class KOFALayout(UtilityView,Layout):
    153153    """A megrok.layout.Layout with additional methods.
    154154    """
    155155    grok.baseclass()
    156156
    157 class SIRPForm(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(SIRPForm,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 SIRPPage(UtilityView,Page):
     173class KOFAPage(UtilityView,Page):
    174174    """A megrok.layout page with additional methods.
    175175    """
    176176    grok.baseclass()
    177177
    178 class SIRPDisplayFormPage(UtilityView,DisplayForm):
     178class KOFADisplayFormPage(UtilityView,DisplayForm):
    179179    """A megrok.layout.DisplayForm with additional methods.
    180180    """
     
    182182    template = default_waeup_display_template
    183183
    184 class SIRPEditFormPage(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(SIRPEditFormPage,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 SIRPAddFormPage(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(SIRPLayout):
     215class SiteLayout(KOFALayout):
    216216    """ The general site layout.
    217217    """
    218     grok.context(ISIRPObject)
     218    grok.context(IKOFAObject)
    219219
    220220    #: An instance of the default theme to use for the site layout
    221     default_theme = SIRPThemeBase()
     221    default_theme = KOFAThemeBase()
    222222    stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt')
    223223    studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt')
     
    297297        hold the internal name of a theme.
    298298
    299         A theme in the waeup.sirp sense consists of a list of
     299        A theme in the waeup.kofa sense consists of a list of
    300300        CSS/JavaScript resources defined in the
    301         :mod:`waeup.sirp.browser.resources` module.
     301        :mod:`waeup.kofa.browser.resources` module.
    302302
    303303        If the context University object has no such attribute or the
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r7750 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """ Viewing components for SIRP objects.
     18""" Viewing components for KOFA objects.
    1919"""
    2020import copy
     
    3737from zope.event import notify
    3838from zope.session.interfaces import ISession
    39 from waeup.sirp.browser import (
    40     SIRPPage, SIRPForm, SIRPEditFormPage, SIRPAddFormPage,
    41     SIRPDisplayFormPage, NullValidator)
    42 from waeup.sirp.browser.interfaces import (
     39from waeup.kofa.browser import (
     40    KOFAPage, KOFAForm, KOFAEditFormPage, KOFAAddFormPage,
     41    KOFADisplayFormPage, NullValidator)
     42from waeup.kofa.browser.interfaces import (
    4343    IUniversity, IFacultiesContainer, IFaculty, IFacultyAdd,
    4444    IDepartment, IDepartmentAdd, ICourse, ICourseAdd, ICertificate,
    4545    ICertificateAdd, ICertificateCourse, ICertificateCourseAdd)
    46 from waeup.sirp.interfaces import MessageFactory as _
    47 from waeup.sirp.browser.resources import warning, datepicker, tabs, datatable
    48 from waeup.sirp.interfaces import(
    49     ISIRPObject, IUsersContainer, IUserAccount, IDataCenter,
    50     ISIRPXMLImporter, ISIRPXMLExporter, IBatchProcessor,
     46from waeup.kofa.interfaces import MessageFactory as _
     47from waeup.kofa.browser.resources import warning, datepicker, tabs, datatable
     48from waeup.kofa.interfaces import(
     49    IKOFAObject, IUsersContainer, IUserAccount, IDataCenter,
     50    IKOFAXMLImporter, IKOFAXMLExporter, IBatchProcessor,
    5151    ILocalRolesAssignable, DuplicationError, IConfigurationContainer,
    5252    ISessionConfiguration, ISessionConfigurationAdd,
    53     IPasswordValidator, IContactForm, ISIRPUtils)
    54 from waeup.sirp.permissions import get_users_with_local_roles, get_all_roles
    55 from waeup.sirp.students.catalog import search as searchstudents
    56 from waeup.sirp.university.catalog import search
    57 from waeup.sirp.university.vocabularies import course_levels
    58 from waeup.sirp.authentication import LocalRoleSetEvent
    59 from waeup.sirp.widgets.restwidget import ReSTDisplayWidget
    60 from waeup.sirp.authentication import get_principal_role_manager
    61 from waeup.sirp.utils.helpers import get_user_account
    62 from waeup.sirp.browser.layout import jsaction, action, UtilityView
    63 
    64 grok.context(ISIRPObject)
     53    IPasswordValidator, IContactForm, IKOFAUtils)
     54from waeup.kofa.permissions import get_users_with_local_roles, get_all_roles
     55from waeup.kofa.students.catalog import search as searchstudents
     56from waeup.kofa.university.catalog import search
     57from waeup.kofa.university.vocabularies import course_levels
     58from waeup.kofa.authentication import LocalRoleSetEvent
     59from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
     60from waeup.kofa.authentication import get_principal_role_manager
     61from waeup.kofa.utils.helpers import get_user_account
     62from waeup.kofa.browser.layout import jsaction, action, UtilityView
     63
     64grok.context(IKOFAObject)
    6565grok.templatedir('templates')
    6666
     
    144144#
    145145
    146 class LoginPage(SIRPPage):
     146class LoginPage(KOFAPage):
    147147    """A login page, available for all objects.
    148148    """
    149149    grok.name('login')
    150     grok.context(ISIRPObject)
     150    grok.context(IKOFAObject)
    151151    grok.require('waeup.Public')
    152152    label = _(u'Login')
     
    179179
    180180
    181 class LogoutPage(SIRPPage):
     181class LogoutPage(KOFAPage):
    182182    """A logout page. Calling this page will log the current user out.
    183183    """
    184     grok.context(ISIRPObject)
     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 SIRP!"))
     192            self.flash(_("You have been logged out. Thanks for using WAeUP KOFA!"))
    193193        self.redirect(self.application_url())
    194194
    195195
    196 class LanguageChangePage(SIRPPage):
     196class LanguageChangePage(KOFAPage):
    197197    """ Language switch
    198198    """
    199     grok.context(ISIRPObject)
     199    grok.context(IKOFAObject)
    200200    grok.name('change_language')
    201201    grok.require('waeup.Public')
    202202
    203203    def update(self, lang='en', view_name='@@index'):
    204         self.response.setCookie('sirp.language', lang, path='/')
     204        self.response.setCookie('kofa.language', lang, path='/')
    205205        self.redirect(self.url(self.context, view_name))
    206206        return
     
    213213#
    214214
    215 class ContactAdminForm(SIRPForm):
     215class ContactAdminForm(KOFAForm):
    216216    grok.name('contactadmin')
    217217    #grok.context(IUniversity)
     
    242242        usertype = getattr(self.request.principal,
    243243                           'user_type', 'system').title()
    244         sirp_utils = getUtility(ISIRPUtils)
    245         success = sirp_utils.sendContactForm(
     244        kofa_utils = getUtility(IKOFAUtils)
     245        success = kofa_utils.sendContactForm(
    246246                fullname,email,
    247247                self.config.name_admin,self.config.email_admin,
     
    263263    @action(_('Send now'), style='primary')
    264264    def send(self, *args, **data):
    265         sirp_utils = getUtility(ISIRPUtils)
    266         success = sirp_utils.sendContactForm(
     265        kofa_utils = getUtility(IKOFAUtils)
     266        success = kofa_utils.sendContactForm(
    267267                data['fullname'],data['email_from'],
    268268                self.config.name_admin,self.config.email_admin,
     
    279279#
    280280
    281 class UniversityPage(SIRPDisplayFormPage):
     281class UniversityPage(KOFADisplayFormPage):
    282282    """ The main university page.
    283283    """
     
    290290    @property
    291291    def frontpage(self):
    292         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    293         lang = self.request.cookies.get('sirp.language', portal_language)
     292        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     293        lang = self.request.cookies.get('kofa.language', portal_language)
    294294        html = self.context['configuration'].frontpage_dict.get(lang,'')
    295295        if html =='':
     
    297297                'configuration'].frontpage_dict.get(portal_language,'')
    298298        if html =='':
    299             return _(u'<h1>Welcome to WAeUP.SIRP</h1>')
     299            return _(u'<h1>Welcome to WAeUP.KOFA</h1>')
    300300        else:
    301301            return html
    302302
    303 class AdministrationPage(SIRPPage):
     303class AdministrationPage(KOFAPage):
    304304    """ The administration overview page.
    305305    """
     
    319319
    320320    name = 'General news feed'
    321     description = 'waeup.sirp now supports RSS 2.0 feeds :-)'
     321    description = 'waeup.kofa now supports RSS 2.0 feeds :-)'
    322322    language = None
    323323    date = None
     
    378378#
    379379
    380 class UsersContainerPage(SIRPPage):
     380class UsersContainerPage(KOFAPage):
    381381    """Overview page for all local users.
    382382    """
     
    418418        return site_roles_string
    419419
    420 class AddUserFormPage(SIRPAddFormPage):
     420class AddUserFormPage(KOFAAddFormPage):
    421421    grok.require('waeup.manageUsers')
    422422    grok.context(IUsersContainer)
     
    456456        self.redirect(self.url(self.context))
    457457
    458 class UserManageFormPage(SIRPEditFormPage):
     458class UserManageFormPage(KOFAEditFormPage):
    459459    """Manage a user account.
    460460    """
     
    525525        usertype = getattr(self.request.principal,
    526526                           'user_type', 'system').title()
    527         sirp_utils = getUtility(ISIRPUtils)
    528         success = sirp_utils.sendContactForm(
     527        kofa_utils = getUtility(IKOFAUtils)
     528        success = kofa_utils.sendContactForm(
    529529                self.request.principal.title,email,
    530530                self.context.title,self.context.email,
     
    550550        self.widgets['title'].displayWidth = 30
    551551
    552 class MyRolesPage(SIRPPage):
     552class MyRolesPage(KOFAPage):
    553553    """Display site roles and local roles assigned to officers.
    554554    """
     
    581581#
    582582
    583 class SearchPage(SIRPPage):
     583class SearchPage(KOFAPage):
    584584    """General search page for the academics section.
    585585    """
     
    608608#
    609609
    610 class ConfigurationContainerDisplayFormPage(SIRPDisplayFormPage):
     610class ConfigurationContainerDisplayFormPage(KOFADisplayFormPage):
    611611    """View page of the configuration container.
    612612    """
     
    619619    form_fields['frontpage'].custom_widget = ReSTDisplayWidget
    620620
    621 class ConfigurationContainerManageFormPage(SIRPEditFormPage):
     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(SIRPAddFormPage):
     686class SessionConfigurationAddFormPage(KOFAAddFormPage):
    687687    """Add a session configuration object to configuration container.
    688688    """
     
    711711        return
    712712
    713 class SessionConfigurationManageFormPage(SIRPEditFormPage):
     713class SessionConfigurationManageFormPage(KOFAEditFormPage):
    714714    """Manage session configuration object.
    715715    """
     
    742742#
    743743
    744 class DatacenterPage(SIRPPage):
     744class DatacenterPage(KOFAPage):
    745745    grok.context(IDataCenter)
    746746    grok.name('index')
     
    749749    pnav = 0
    750750
    751 class DatacenterUploadPage(SIRPPage):
     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(SIRPPage):
     796class DatacenterImportStep1(KOFAPage):
    797797    """Manual import step 1: choose file
    798798    """
     
    820820        if select is not None:
    821821            # A filename was selected
    822             session = ISession(self.request)['waeup.sirp']
     822            session = ISession(self.request)['waeup.kofa']
    823823            session['import_filename'] = select
    824824            self.redirect(self.url(self.context, '@@import2'))
    825825
    826 class DatacenterImportStep2(SIRPPage):
     826class DatacenterImportStep2(KOFAPage):
    827827    """Manual import step 2: choose importer
    828828    """
     
    909909    def update(self, mode=None, importer=None,
    910910               back1=None, cancel=None, proceed=None):
    911         session = ISession(self.request)['waeup.sirp']
     911        session = ISession(self.request)['waeup.kofa']
    912912        self.filename = session.get('import_filename', None)
    913913
     
    944944            self.flash(warnings)
    945945
    946 class DatacenterImportStep3(SIRPPage):
     946class DatacenterImportStep3(KOFAPage):
    947947    """Manual import step 3: modify header
    948948    """
     
    10231023
    10241024    def update(self, headerfield=None, back2=None, cancel=None, proceed=None):
    1025         session = ISession(self.request)['waeup.sirp']
     1025        session = ISession(self.request)['waeup.kofa']
    10261026        self.filename = session.get('import_filename', None)
    10271027        self.mode = session.get('import_mode', None)
     
    10521052            self.flash(warnings)
    10531053
    1054 class DatacenterImportStep4(SIRPPage):
     1054class DatacenterImportStep4(KOFAPage):
    10551055    """Manual import step 4: do actual import
    10561056    """
     
    10741074            self.redirect(self.url(self.context))
    10751075            return
    1076         session = ISession(self.request)['waeup.sirp']
     1076        session = ISession(self.request)['waeup.kofa']
    10771077        self.filename = session.get('import_filename', None)
    10781078        self.mode = session.get('import_mode', None)
     
    11111111            mapping = {'a':linenum - self.warn_num}))
    11121112
    1113 class DatacenterLogsOverview(SIRPPage):
     1113class DatacenterLogsOverview(KOFAPage):
    11141114    grok.context(IDataCenter)
    11151115    grok.name('logs')
     
    11221122
    11231123    def update(self, show=None, logname=None, back=None):
    1124         session = ISession(self.request)['waeup.sirp']
     1124        session = ISession(self.request)['waeup.kofa']
    11251125        if back is not None:
    11261126            self.redirect(self.url(self.context))
     
    11331133        self.files = self.context.getLogFiles()
    11341134
    1135 class DatacenterLogsFileview(SIRPPage):
     1135class DatacenterLogsFileview(KOFAPage):
    11361136    grok.context(IDataCenter)
    11371137    grok.name('show')
     
    11531153            self.redirect(self.url(self.context, '@@logs'))
    11541154            return
    1155         session = ISession(self.request)['waeup.sirp']
     1155        session = ISession(self.request)['waeup.kofa']
    11561156        logname = session.get('logname', None)
    11571157        if back is not None or logname is None:
     
    11721172        popen.close()
    11731173
    1174 class DatacenterSettings(SIRPPage):
     1174class DatacenterSettings(KOFAPage):
    11751175    grok.context(IDataCenter)
    11761176    grok.name('manage')
     
    12151215
    12161216    def render(self):
    1217         exporter = ISIRPXMLExporter(self.context)
     1217        exporter = IKOFAXMLExporter(self.context)
    12181218        xml = exporter.export().read()
    12191219        self.response.setHeader(
     
    12211221        return xml
    12221222
    1223 class ImportXMLPage(SIRPPage):
     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 = ISIRPXMLImporter(self.context)
     1239        importer = IKOFAXMLImporter(self.context)
    12401240        obj = importer.doImport(xmlfile)
    12411241        if type(obj) != type(self.context):
     
    12571257#
    12581258
    1259 class FacultiesContainerPage(SIRPPage):
     1259class FacultiesContainerPage(KOFAPage):
    12601260    """ Index page for faculty containers.
    12611261    """
     
    12671267    grok.template('facultypage')
    12681268
    1269 class FacultiesContainerManageFormPage(SIRPEditFormPage):
     1269class FacultiesContainerManageFormPage(KOFAEditFormPage):
    12701270    """Manage the basic properties of a `Faculty` instance.
    12711271    """
     
    13021302
    13031303
    1304 class FacultyAddFormPage(SIRPAddFormPage):
     1304class FacultyAddFormPage(KOFAAddFormPage):
    13051305    """ Page form to add a new faculty to a faculty container.
    13061306    """
     
    13301330# Faculty pages
    13311331#
    1332 class FacultyPage(SIRPPage):
     1332class FacultyPage(KOFAPage):
    13331333    """Index page of faculties.
    13341334    """
     
    13421342        return _('Departments')
    13431343
    1344 class FacultyManageFormPage(SIRPEditFormPage):
     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(SIRPAddFormPage):
     1418class DepartmentAddFormPage(KOFAAddFormPage):
    14191419    """Add a department to a faculty.
    14201420    """
     
    14461446# Department pages
    14471447#
    1448 class DepartmentPage(SIRPPage):
     1448class DepartmentPage(KOFAPage):
    14491449    """Department index page.
    14501450    """
     
    14751475            yield(dict(url=url, name=key, container=val))
    14761476
    1477 class ShowStudentsInDepartmentPage(SIRPPage):
     1477class ShowStudentsInDepartmentPage(KOFAPage):
    14781478    """Page that lists all students in the department.
    14791479    """
     
    15101510        return hitlist
    15111511
    1512 class DepartmentManageFormPage(SIRPEditFormPage):
     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(SIRPAddFormPage):
     1614class CourseAddFormPage(KOFAAddFormPage):
    16151615    """Add-form to add course to a department.
    16161616    """
     
    16491649        return
    16501650
    1651 class CertificateAddFormPage(SIRPAddFormPage):
     1651class CertificateAddFormPage(KOFAAddFormPage):
    16521652    """Add-form to add certificate to a department.
    16531653    """
     
    16901690# Courses pages
    16911691#
    1692 class CoursePage(SIRPDisplayFormPage):
     1692class CoursePage(KOFADisplayFormPage):
    16931693    """Course index page.
    16941694    """
     
    17031703        return '%s (%s)' % (self.context.title, self.context.code)
    17041704
    1705 class CourseManageFormPage(SIRPEditFormPage):
     1705class CourseManageFormPage(KOFAEditFormPage):
    17061706    """Edit form page for courses.
    17071707    """
     
    17341734# Certificate pages
    17351735#
    1736 class CertificatePage(SIRPDisplayFormPage):
     1736class CertificatePage(KOFADisplayFormPage):
    17371737    """Index page for certificates.
    17381738    """
     
    17521752        return super(CertificatePage, self).update()
    17531753
    1754 class CertificateManageFormPage(SIRPEditFormPage):
     1754class CertificateManageFormPage(KOFAEditFormPage):
    17551755    """Manage the properties of a `Certificate` instance.
    17561756    """
     
    18301830
    18311831
    1832 class CertificateCourseAddFormPage(SIRPAddFormPage):
     1832class CertificateCourseAddFormPage(KOFAAddFormPage):
    18331833    """Add-page to add a course ref to a certificate
    18341834    """
     
    18621862# Certificate course pages...
    18631863#
    1864 class CertificateCoursePage(SIRPPage):
     1864class CertificateCoursePage(KOFAPage):
    18651865    """CertificateCourse index page.
    18661866    """
     
    18791879        return course_levels.getTerm(self.context.level).title
    18801880
    1881 class CertificateCourseManageFormPage(SIRPEditFormPage):
     1881class CertificateCourseManageFormPage(KOFAEditFormPage):
    18821882    """Manage the basic properties of a `CertificateCourse` instance.
    18831883    """
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/resources.py

    r7592 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Special JavaScript and CSS resources provided by waeup.sirp.
     18"""Special JavaScript and CSS resources provided by waeup.kofa.
    1919"""
    2020#from hurry import yui
     
    2424
    2525
    26 #: All local resources are registered under the name ``waeup_sirp``.
    27 waeup_sirp = Library('waeup_sirp', 'static')
     26#: All local resources are registered under the name ``waeup_kofa``.
     27waeup_kofa = Library('waeup_kofa', 'static')
    2828
    2929#: A resource that binds a jQueryUI datepicker widget to each
     
    3636#:   require the JavaScript code to be rendered into the page::
    3737#:
    38 #:     from waeup.sirp.browser.resources import datepicker
     38#:     from waeup.kofa.browser.resources import datepicker
    3939#:     # ...
    4040#:     class MyPage(...):
     
    8989#: ``"datepicker-us-year"``
    9090#:    same but also adds a select field for year
    91 datepicker = ResourceInclusion(waeup_sirp, 'datepicker.js',
     91datepicker = ResourceInclusion(waeup_kofa, 'datepicker.js',
    9292                               depends=[jqueryui])
    9393
     
    9999#:   require the JavaScript code to be rendered into the page::
    100100#:
    101 #:     from waeup.sirp.browser.resources import warning
     101#:     from waeup.kofa.browser.resources import warning
    102102#:     # ...
    103103#:     class MyPage(...):
     
    115115#:        <input type="submit" name="xyz" value="abc">
    116116#:               onclick="return confirmPost('Are you sure?')"/>
    117 warning = ResourceInclusion(waeup_sirp, 'warning.js')
     117warning = ResourceInclusion(waeup_kofa, 'warning.js')
    118118
    119119#: If you have many select boxes in a from which have to be selected at the same
     
    123123#:   require the JavaScript code to be rendered into the page::
    124124#:
    125 #:     from waeup.sirp.browser.resources import toggleall
     125#:     from waeup.kofa.browser.resources import toggleall
    126126#:     # ...
    127127#:     class MyPage(...):
     
    138138#:
    139139#:    <input type="checkbox" onClick="toggle(this, 'entries')" />
    140 toggleall = ResourceInclusion(waeup_sirp, 'toggleall.js')
     140toggleall = ResourceInclusion(waeup_kofa, 'toggleall.js')
    141141
    142142#: A resource that binds Bootstrap tabs to <div> tags with class
     
    150150#:   tab for redirection::
    151151#:
    152 #:     from waeup.sirp.browser.resources import tabs
     152#:     from waeup.kofa.browser.resources import tabs
    153153#:
    154154#:     class MyPage(...):
     
    188188#: for details.
    189189#:
    190 tabs = ResourceInclusion(waeup_sirp, 'bootstrap-tabs-1.4.0.js',
     190tabs = ResourceInclusion(waeup_kofa, 'bootstrap-tabs-1.4.0.js',
    191191                          depends=[jquery])
    192192
     
    197197#: use of datatables you might want to add some specialized CSS like
    198198#: `datatable_css` below.
    199 datatables = ResourceInclusion(waeup_sirp, 'jquery.dataTables.js',
     199datatables = ResourceInclusion(waeup_kofa, 'jquery.dataTables.js',
    200200                               minified='jquery.dataTables.min.js',
    201201                               depends=[jquery])
    202202
    203203#: A stylesheet for datatables
    204 datatables_css = ResourceInclusion(waeup_sirp, 'datatables.css')
     204datatables_css = ResourceInclusion(waeup_kofa, 'datatables.css')
    205205
    206206#: A resource that turns HTML tables into sortable, searchable and :
     
    214214#:   require the JavaScript code to be rendered into the page::
    215215#:
    216 #:     from waeup.sirp.browser.resources import datatable
     216#:     from waeup.kofa.browser.resources import datatable
    217217#:     # ...
    218218#:     class MyPage(...):
     
    251251#: for details.
    252252#:
    253 datatable = ResourceInclusion(waeup_sirp, 'datatable.js',
     253datatable = ResourceInclusion(waeup_kofa, 'datatable.js',
    254254                              depends=[datatables, datatables_css])
    255255
    256256#: Register Twitter's Bootsrap css including dropdown js as a resource.
    257257bootstrap_min = ResourceInclusion(
    258     waeup_sirp, 'bootstrap-1.4.0.css')
     258    waeup_kofa, 'bootstrap-1.4.0.css')
    259259
    260260dropdown = ResourceInclusion(
    261     waeup_sirp, 'bootstrap-dropdown-1.4.0.js',
     261    waeup_kofa, 'bootstrap-dropdown-1.4.0.js',
    262262    depends=[jquery])
    263263
    264 #: Register basic SIRP 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(
    267     waeup_sirp, 'waeup-base.css',
     267    waeup_kofa, 'waeup-base.css',
    268268    depends=[dropdown,bootstrap_min, base])
    269269
    270270#: A basic theme based on jQuery only (crappy yet).
    271271waeuptheme_empty = ResourceInclusion(
    272     waeup_sirp, 'empty.css',
     272    waeup_kofa, 'empty.css',
    273273    depends=[humanity])
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/static/datatable.js

    r6023 r7811  
    44                "aaSorting": [[ 1, "asc" ]],
    55                "aoColumnDefs":[{ "bSortable": false, "aTargets": [ 0 ] }]
    6         } );   
     6        } );
    77});
    88
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/static/datepicker.js

    r6060 r7811  
    11$(function() {
    2   $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd', 
     2  $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd',
    33                                  duration: 'fast'
    44  });
     
    2424
    2525$(function() {
    26   $( ".datepicker-year" ).datepicker({ dateFormat: 'yy-mm-dd', 
     26  $( ".datepicker-year" ).datepicker({ dateFormat: 'yy-mm-dd',
    2727        duration: 'fast',
    2828        changeYear: true,
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/static/waeup-base.css

    r7746 r7811  
    1 /* This is the base stylesheet for SIRP. It defines base styles
     1/* This is the base stylesheet for KOFA. It defines base styles
    22additionally or modifying Bootstrap styles. For themes, please create
    33a stylesheet overriding values set here in a file named
     
    132132}
    133133
    134  /* SIRP stuff */
     134 /* KOFA stuff */
    135135
    136136div.actionbar {
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatecoursepage.pt

    r7705 r7811  
    1 <table i18n:domain="waeup.sirp" class="form-table">
     1<table i18n:domain="waeup.kofa" class="form-table">
    22  <thead>
    33  </thead>
     
    66      <td i18n:translate="">Code:</td>
    77      <td tal:content="context/__name__">CODE</td>
    8     </tr> 
     8    </tr>
    99    <tr>
    1010      <td i18n:translate="">Course Code:</td>
    1111      <td tal:content="context/getCourseCode">THE COURSE</td>
    12     </tr>   
     12    </tr>
    1313    <tr>
    1414      <td i18n:translate="">Course Title:</td>
     
    1717    <tr>
    1818      <td i18n:translate="">Provided by:</td>
    19       <td> 
     19      <td>
    2020      <span tal:content="python: context.course.__parent__.__parent__.longtitle()">DEPARTMENT</span>
    2121      <br />
    2222      <span tal:content="python: context.course.__parent__.__parent__.__parent__.longtitle()">FACULTY</span>
    2323      </td>
    24     </tr>   
     24    </tr>
    2525    <tr>
    2626      <td i18n:translate="">Level:</td>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatemanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data" i18n:domain="waeup.sirp">
     2      enctype="multipart/form-data" i18n:domain="waeup.kofa">
    33
    44  <ul class="tabs" data-tabs="tabs">
     
    77    <li tal:attributes="class view/tab3"><a href="#tab-3" i18n:translate="">Local Roles</a></li>
    88  </ul>
    9    
     9
    1010  <div class="tab-content">
    1111    <div id="tab-1" tal:attributes="class view/tab1">
     
    136136    </div>
    137137  </div>
    138 </form> 
     138</form>
    139139
    140140
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatepage.pt

    r7705 r7811  
    11<table class="form-table">
    22<thead>
    3 </thead> 
     3</thead>
    44<tbody>
    55  <tal:block repeat="widget view/widgets">
     
    2020<h3>
    2121  <span tal:content="context/__name__">Code</span>
    22   <span i18n:domain="waeup.sirp" i18n:translate="">Course Referrers</span>
     22  <span i18n:domain="waeup.kofa" i18n:translate="">Course Referrers</span>
    2323</h3>
    2424<br />
    25 <table i18n:domain="waeup.sirp" class="display dataTable">
     25<table i18n:domain="waeup.kofa" class="display dataTable">
    2626<thead>
    2727  <tr>
     
    4949             tal:content="cc/course/code">
    5050        COURSE CODE
    51       </a>     
     51      </a>
    5252    <td>
    5353      <span tal:content="cc/course/title">
     
    5959           MANDATORY
    6060      </span>
    61     </td>               
     61    </td>
    6262  </tr>
    6363</tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/configurationmanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   enctype="multipart/form-data" i18n:domain="waeup.sirp">
     2  enctype="multipart/form-data" i18n:domain="waeup.kofa">
    33    <ul class="tabs" data-tabs="tabs">
    44      <li tal:attributes="class view/tab1">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/contactform.pt

    r7464 r7811  
    33
    44  <tal:block repeat="widget view/widgets">
    5    
     5
    66    <div tal:condition="python: widget.name != 'form.body'"
    77         tal:content="widget/label">Label
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport1page.pt

    r7705 r7811  
    1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 1</h3>
    2 <p i18n:domain="waeup.sirp" i18n:translate="">
     1<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 1</h3>
     2<p i18n:domain="waeup.kofa" i18n:translate="">
    33  Using batch processing you can mass-create, mass-update, or
    44  mass-remove datasets from the database using CSV files.
    55</p>
    6 <p i18n:domain="waeup.sirp" i18n:translate="">
     6<p i18n:domain="waeup.kofa" i18n:translate="">
    77  Please select a file for processing from the list below.
    88</p>
    9 <form i18n:domain="waeup.sirp" method="POST">
     9<form i18n:domain="waeup.kofa" method="POST">
    1010  <table>
    1111    <thead>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport2page.pt

    r7705 r7811  
    1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 2</h3>
    2 <form i18n:domain="waeup.sirp" method="POST">
     1<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 2</h3>
     2<form i18n:domain="waeup.kofa" method="POST">
    33  <p>
    44    <b i18n:translate="">File:</b>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport3page.pt

    r7705 r7811  
    1 <div i18n:domain="waeup.sirp" i18n:translate=""
     1<div i18n:domain="waeup.kofa" i18n:translate=""
    22  class="alert-message success" tal:condition="not: view/getWarnings">
    33  Header fields OK
    44</div>
    55
    6 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 3</h3>
    7 <form i18n:domain="waeup.sirp">
     6<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 3</h3>
     7<form i18n:domain="waeup.kofa">
    88  <p i18n:translate="">
    99    Eventually modify headerfields of import file below.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport4page.pt

    r7705 r7811  
    1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 4</h3>
    2 <p i18n:domain="waeup.sirp" i18n:translate="">
     1<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 4</h3>
     2<p i18n:domain="waeup.kofa" i18n:translate="">
    33  Batch processing finished.
    44</p>
    5 <p i18n:domain="waeup.sirp">
     5<p i18n:domain="waeup.kofa">
    66  <b i18n:translate="">File:</b> <span tal:content="view/filename">Filename.csv</span>
    77</p>
    8 <p i18n:domain="waeup.sirp">
     8<p i18n:domain="waeup.kofa">
    99  <b i18n:translate="">Processor:</b>
    1010  <span tal:content="view/importer/name">Importer Name</span>
    1111</p>
    12 <p i18n:domain="waeup.sirp">
     12<p i18n:domain="waeup.kofa">
    1313  <b i18n:translate="">Processing mode: </b>
    1414  <span tal:content="view/mode">mode</span>
    1515</p>
    16 <form method="POST" i18n:domain="waeup.sirp">
     16<form method="POST" i18n:domain="waeup.kofa">
    1717  <input class="btn primary" type="submit" name="finish"
    1818    tal:attributes="value view/back_button" />
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogspage.pt

    r7705 r7811  
    1 <div i18n:domain="waeup.sirp" tal:define="files view/files">
     1<div i18n:domain="waeup.kofa" tal:define="files view/files">
    22  <p i18n:translate="" tal:condition="not: files">
    33  Currently no log files are available.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacentermanagepage.pt

    r7705 r7811  
    1 <form  i18n:domain="waeup.sirp" method="POST">
     1<form  i18n:domain="waeup.kofa" method="POST">
    22  <div>
    33    <span  i18n:translate="">Storage path:</span>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt

    r7745 r7811  
    1 <p  i18n:domain="waeup.sirp" i18n:translate="">
     1<p  i18n:domain="waeup.kofa" i18n:translate="">
    22The data center helps you to manage portal data. You can upload CSV
    33files here, which will be available for import afterwards.
    44</p>
    55
    6 <p i18n:domain="waeup.sirp">
     6<p i18n:domain="waeup.kofa">
    77  <b i18n:translate="">Storage path:</b>
    88  <span tal:content="context/storage">/foo/bar</span>
    99</p>
    1010
    11 <table i18n:domain="waeup.sirp">
     11<table i18n:domain="waeup.kofa">
    1212  <thead>
    1313    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentmanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2  i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33  <ul class="tabs" data-tabs="tabs">
    44    <li tal:attributes="class view/tab1">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentpage.pt

    r7707 r7811  
    1 <ul i18n:domain="waeup.sirp" class="tabs" data-tabs="tabs">
     1<ul i18n:domain="waeup.kofa" class="tabs" data-tabs="tabs">
    22  <li class="active"><a href="#tab-1">
    33   <span i18n:translate="">Courses</span></a>
     
    77  </li>
    88</ul>
    9 <div  i18n:domain="waeup.sirp" class="tab-content">
     9<div  i18n:domain="waeup.kofa" class="tab-content">
    1010    <div id="tab-1" class="active">
    11     <br /> 
     11    <br />
    1212    <table class="display dataTable">
    1313      <thead>
     
    2626          <td tal:content="entry/container/title">
    2727               Title
    28           </td> 
     28          </td>
    2929        </tr>
    3030      </tbody>
    3131    </table>
    3232    <br /><br />
    33     </div> 
     33    </div>
    3434    <div id="tab-2">
    3535    <br />
     
    5050          <td tal:content="entry/container/title">
    5151               Title
    52           </td> 
     52          </td>
    5353        </tr>
    5454      </tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultymanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL"
    2   i18n:domain="waeup.sirp" method="POST" enctype="multipart/form-data">
     2  i18n:domain="waeup.kofa" method="POST" enctype="multipart/form-data">
    33  <ul class="tabs" data-tabs="tabs">
    44    <li tal:attributes="class view/tab1">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultypage.pt

    r7707 r7811  
    1 <div i18n:domain="waeup.sirp" i18n:translate="" tal:condition="python: not len(context.keys())">
     1<div i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python: not len(context.keys())">
    22There no subobjects registered yet.
    33</div>
    44
    5 <table i18n:domain="waeup.sirp">
     5<table i18n:domain="waeup.kofa">
    66  <thead>
    77    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt

    r7707 r7811  
    1 <form i18n:domain="waeup.sirp" method="post">
     1<form i18n:domain="waeup.kofa" method="post">
    22  <table id="login" class="form-table" summary="Table for entering login information">
    33    <tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/myrolespage.pt

    r7707 r7811  
    1 <h3 i18n:domain="waeup.sirp"
     1<h3 i18n:domain="waeup.kofa"
    22    i18n:translate="">My Portal Roles:</h3>
    3 <table i18n:domain="waeup.sirp" class="form-table">
     3<table i18n:domain="waeup.kofa" class="form-table">
    44<tr tal:repeat="role view/getSiteRoles">
    55    <td>
     
    99</table>
    1010
    11 <h3 i18n:domain="waeup.sirp"
     11<h3 i18n:domain="waeup.kofa"
    1212    i18n:translate="">My Local Roles:</h3>
    1313<table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/notfound.pt

    r7707 r7811  
    1 <h2 i18n:domain="waeup.sirp" i18n:translate="">
     1<h2 i18n:domain="waeup.kofa" i18n:translate="">
    22  The page you are trying to access is not available.
    33</h2>
    44
    5 <div i18n:domain="waeup.sirp">
     5<div i18n:domain="waeup.kofa">
    66  <b i18n:translate="">Please note the following:</b></div>
    7 <div i18n:domain="waeup.sirp">
     7<div i18n:domain="waeup.kofa">
    88  <ol class="list">
    99    <li i18n:translate="">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/searchpage.pt

    r7707 r7811  
    66</form>
    77<br />
    8 <span  i18n:domain="waeup.sirp" tal:condition="view/hitlist">
     8<span  i18n:domain="waeup.kofa" tal:condition="view/hitlist">
    99    <h3 i18n:translate="">Search Results</h3>
    1010    <table class="display dataTable">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/showstudentspage.pt

    r7707 r7811  
    1 <table i18n:domain="waeup.sirp" class="display dataTable">
     1<table i18n:domain="waeup.kofa" class="display dataTable">
    22  <thead>
    33        <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt

    r7707 r7811  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.sirp">
     2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.kofa">
    33  <head>
    44    <title>WAeUP - your way up
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt

    r7707 r7811  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2 <html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="waeup.sirp">
     2<html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="waeup.kofa">
    33  <head>
    44    <title>WAeUP - your way up
     
    1010    <meta name="viewport" content="width=320, initial-scale=1, maximum-scale=1"/>
    1111    <link rel="stylesheet" media="only screen and (max-device-width: 480px)"
    12         tal:attributes="href python: view.url(layout.site, '@@/waeup.sirp.browser/mobile.css')"
     12        tal:attributes="href python: view.url(layout.site, '@@/waeup.kofa.browser/mobile.css')"
    1313        type="text/css" />
    1414    <link rel="shortcut icon" tal:attributes="href static/favicon.ico" type="image/x-icon" />
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/universityrss20feed.pt

    r4989 r7811  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <rss version="2.0" 
    3      xmlns:tal="http://xml.zope.org/namespaces/tal" 
     2<rss version="2.0"
     3     xmlns:tal="http://xml.zope.org/namespaces/tal"
    44     xmlns:atom="http://www.w3.org/2005/Atom">
    55  <channel>
    66    <title>
    77      <tal:block tal:content="view/title"/>
    8       <tal:block 
    9           tal:define="title view/contexttitle" 
     8      <tal:block
     9          tal:define="title view/contexttitle"
    1010          tal:condition="title"> - <tal:block content="title"/>
    1111      </tal:block>
     
    1616        tal:content="view/description"></description>
    1717    <language
    18         tal:condition="view/language" 
     18        tal:condition="view/language"
    1919        tal:content="view/language"></language>
    2020    <pubDate
    21         tal:condition="view/date" 
     21        tal:condition="view/date"
    2222        tal:content="view/date"></pubDate>
    2323    <lastBuildDate
    24         tal:condition="view/buildDate" 
     24        tal:condition="view/buildDate"
    2525        tal:content="view/buildDate"></lastBuildDate>
    2626    <managingEditor
    27         tal:condition="view/editor" 
     27        tal:condition="view/editor"
    2828        tal:content="view/editor"></managingEditor>
    2929    <webMaster
    30         tal:condition="view/webmaster" 
     30        tal:condition="view/webmaster"
    3131        tal:content="view/webmaster"></webMaster>
    3232    <atom:link
    33         tal:attributes="href string:${view/link}@@feeds/${view/name}" 
     33        tal:attributes="href string:${view/link}@@feeds/${view/name}"
    3434        rel="self" type="application/rss+xml" />
    3535    <item
     
    4040          tal:content="item/description"></description>
    4141      <guid
    42           tal:content="item/guid" 
     42          tal:content="item/guid"
    4343          tal:define="isPermaLink item/isPermaLink|nothing"
    4444          tal:attributes="isPermaLink python:isPermaLink and 'true' or 'false'"></guid>
    4545      <link
    46           tal:condition="item/link|nothing" 
     46          tal:condition="item/link|nothing"
    4747          tal:content="item/link"></link>
    4848      <author
    49           tal:condition="item/author|nothing" 
     49          tal:condition="item/author|nothing"
    5050          tal:content="item/author"></author>
    5151      <category
    52           tal:condition="item/category|nothing" 
     52          tal:condition="item/category|nothing"
    5353          tal:content="item/category"></category>
    5454      <pubDate
    55           tal:condition="item/pubDate|nothing" 
     55          tal:condition="item/pubDate|nothing"
    5656          tal:content="item/pubDate"></pubDate>
    5757    </item>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/usereditformpage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/userscontainerpage.pt

    r7745 r7811  
    1 <table i18n:domain="waeup.sirp">
     1<table i18n:domain="waeup.kofa">
    22  <thead>
    33    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_captcha.py

    r7312 r7811  
    2121from zope.interface import verify
    2222from zope.publisher.browser import TestRequest
    23 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    24 from waeup.sirp.browser.captcha import (
     23from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     24from waeup.kofa.browser.captcha import (
    2525    CaptchaResponse, CaptchaRequest, NullCaptcha, StaticCaptcha, ReCaptcha,
    2626    CaptchaManager)
    27 from waeup.sirp.browser.interfaces import (
     27from waeup.kofa.browser.interfaces import (
    2828    ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig,
    2929    ICaptchaManager)
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_doctests.py

    r7195 r7811  
    1818"""Setup doctests for browser module.
    1919"""
    20 from waeup.sirp.testing import get_doctest_suite
     20from waeup.kofa.testing import get_doctest_suite
    2121
    2222def test_suite():
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_permissions.py

    r7195 r7811  
    3131from zope.security.interfaces import Unauthorized
    3232from zope.testbrowser.testing import Browser
    33 from waeup.sirp.app import University
    34 from waeup.sirp.testing import (
     33from waeup.kofa.app import University
     34from waeup.kofa.testing import (
    3535    FunctionalLayer, FunctionalTestCase, get_all_loggers, remove_new_loggers,
    3636    remove_logger)
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/theming.py

    r7459 r7811  
    2323from zope.interface import Interface
    2424from zope.schema.interfaces import IVocabularyFactory
    25 from waeup.sirp.interfaces import SimpleSIRPVocabulary
    26 from waeup.sirp.browser.interfaces import ITheme
    27 from waeup.sirp.browser.resources import (
     25from waeup.kofa.interfaces import SimpleKOFAVocabulary
     26from waeup.kofa.browser.interfaces import ITheme
     27from waeup.kofa.browser.resources import (
    2828    waeuptheme_empty, waeup_base_css,
    2929    )
    3030
    31 class SIRPThemeBase(grok.GlobalUtility):
     31class KOFAThemeBase(grok.GlobalUtility):
    3232    grok.implements(ITheme)
    3333    grok.name('base waeup theme')
     
    3838        return [waeup_base_css]
    3939
    40 #class SIRPThemeRed1(grok.GlobalUtility):
     40#class KOFAThemeRed1(grok.GlobalUtility):
    4141#    grok.implements(ITheme)
    4242#    grok.name('red waeup theme')
     
    4747#        return [waeuptheme_red1]
    4848
    49 #class SIRPThemeGray1(grok.GlobalUtility):
     49#class KOFAThemeGray1(grok.GlobalUtility):
    5050#    grok.implements(ITheme)
    5151#    grok.name('gray waeup theme')
     
    5656#        return [waeuptheme_gray1]
    5757
    58 class SIRPThemeEmpty(grok.GlobalUtility):
     58class KOFAThemeEmpty(grok.GlobalUtility):
    5959    """A theme based on jQuery only.
    6060
     
    8787    and registered under the name
    8888
    89       'waeup.sirp.browser.theming.ThemesVocabulary'
     89      'waeup.kofa.browser.theming.ThemesVocabulary'
    9090
    9191    Interface fields that wish to provide a list of available themes
    9292    can require a 'named vocabulary', i.e. set:
    9393
    94       vocabulary = 'waeup.sirp.browser.theming.ThemesVocabulary'
     94      vocabulary = 'waeup.kofa.browser.theming.ThemesVocabulary'
    9595
    9696    and the vocabulary will deliver themes and their descriptive text
     
    101101    """
    102102    grok.implements(IVocabularyFactory)
    103     grok.name('waeup.sirp.browser.theming.ThemesVocabulary')
     103    grok.name('waeup.kofa.browser.theming.ThemesVocabulary')
    104104
    105105    def __call__(self, context):
     
    112112        terms = [(theme.description, name)
    113113                 for name, theme in get_all_themes()]
    114         vocab = SimpleSIRPVocabulary(*terms)
     114        vocab = SimpleKOFAVocabulary(*terms)
    115115        return vocab
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r7736 r7811  
    2323from zope.location.interfaces import ISite
    2424from zope.traversing.browser import absoluteURL
    25 from waeup.sirp.browser.pages import (
     25from waeup.kofa.browser.pages import (
    2626    UniversityPage, FacultiesContainerPage, DatacenterPage, FacultyPage,
    2727    DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage,
    2828    UsersContainerPage, UserManageFormPage)
    29 from waeup.sirp.browser.interfaces import (
     29from waeup.kofa.browser.interfaces import (
    3030    IFacultiesContainer, IFaculty, IDepartment, ICourse, ICertificate,
    3131    ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer)
    32 from waeup.sirp.interfaces import (
    33     ISIRPUtils, ISIRPObject, ISIRPXMLExporter,
    34     ISIRPXMLImporter, IDataCenter, IUserAccount)
    35 from waeup.sirp.browser.layout import SIRPPage, default_primary_nav_template
    36 from waeup.sirp.utils.helpers import get_user_account
    37 
    38 from waeup.sirp.interfaces import MessageFactory as _
     32from waeup.kofa.interfaces import (
     33    IKOFAUtils, IKOFAObject, IKOFAXMLExporter,
     34    IKOFAXMLImporter, IDataCenter, IUserAccount)
     35from waeup.kofa.browser.layout import KOFAPage, default_primary_nav_template
     36from waeup.kofa.utils.helpers import get_user_account
     37
     38from waeup.kofa.interfaces import MessageFactory as _
    3939
    4040grok.templatedir('templates')
    41 grok.context(ISIRPObject) # Make ISIRPObject the default context
     41grok.context(IKOFAObject) # Make IKOFAObject the default context
    4242
    4343class LeftSidebar(grok.ViewletManager):
     
    8585    """
    8686    grok.baseclass()
    87     grok.context(ISIRPObject)
     87    grok.context(IKOFAObject)
    8888    grok.viewletmanager(ActionBar)
    8989    icon = 'actionicon_modify.png' # File must exist in static/
     
    126126            # local to the derived class' module. As we often like to
    127127            # get the icons from here
    128             # (i.e. waeup.sirp.browser/static), we set the directory
     128            # (i.e. waeup.kofa.browser/static), we set the directory
    129129            # resource appropiately.
    130130            #
     
    134134            # TODO: notes in here should go to general documentation.
    135135            static = queryAdapter(
    136                 self.request, Interface, name='waeup.sirp.browser')
     136                self.request, Interface, name='waeup.kofa.browser')
    137137        return static[self.icon]()
    138138
     
    196196
    197197class BreadCrumbs(grok.Viewlet):
    198     grok.context(ISIRPObject)
     198    grok.context(IKOFAObject)
    199199    grok.viewletmanager(BreadCrumbManager)
    200200    grok.order(1)
     
    216216    """
    217217    grok.viewletmanager(LanguageManager)
    218     grok.context(ISIRPObject)
     218    grok.context(IKOFAObject)
    219219    grok.require('waeup.Public')
    220220    title = u'Languages'
    221221
    222222    def render(self):
    223         preferred_languages = getUtility(ISIRPUtils).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(ISIRPObject)
     259    grok.context(IKOFAObject)
    260260    grok.order(5)
    261261    grok.require('waeup.manageUniversity')
     
    278278                # local to the derived class' module. As we often like to
    279279                # get the icons from here
    280                 # (i.e. waeup.sirp.browser/static), we set the directory
     280                # (i.e. waeup.kofa.browser/static), we set the directory
    281281                # resource appropiately.
    282282                #
     
    286286                # TODO: notes in here should go to general documentation.
    287287                static = queryAdapter(
    288                     self.request, Interface, name='waeup.sirp.browser')
     288                    self.request, Interface, name='waeup.kofa.browser')
    289289            return static[self.icon]()
    290290        return
     
    310310
    311311#
    312 # waeup.sirp.app.University viewlets...
     312# waeup.kofa.app.University viewlets...
    313313#
    314314class Login(grok.Viewlet):
     
    316316    """
    317317    grok.viewletmanager(LeftSidebar)
    318     grok.context(ISIRPObject)
     318    grok.context(IKOFAObject)
    319319    grok.view(Interface)
    320320    grok.order(2)
     
    350350    """
    351351    grok.viewletmanager(LeftSidebar)
    352     grok.context(ISIRPObject)
     352    grok.context(IKOFAObject)
    353353    grok.view(Interface)
    354354    grok.order(5)
     
    520520class BrowseActionButton(ActionButton):
    521521    grok.baseclass()
    522     grok.context(ISIRPObject)
     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 SIRP.
     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

    r7321 r7811  
    2727from zope.intid.interfaces import IIntIds
    2828
    29 from waeup.sirp.app import University
    30 from waeup.sirp.interfaces import IQueryResultItem
     29from waeup.kofa.app import University
     30from waeup.kofa.interfaces import IQueryResultItem
    3131
    3232# not yet used
    33 class SIRPQuery(Query):
     33class KOFAQuery(Query):
    3434    """A hurry.query-like query that supports also ``apply``.
    3535    """
     
    5050        return results
    5151
    52 grok.global_utility(SIRPQuery)
     52grok.global_utility(KOFAQuery)
    5353
    5454# not yet used
  • main/waeup.kofa/trunk/src/waeup/kofa/catalog.txt

    r7321 r7811  
    1 :mod:`waeup.sirp.catalog` -- Cataloging support SIRP
     1:mod:`waeup.kofa.catalog` -- Cataloging support KOFA
    22****************************************************
    33
    4 .. module:: waeup.sirp.catalog
     4.. module:: waeup.kofa.catalog
    55
    66Components that support cataloging and searching objects inside a
    7 SIRP site.
     7KOFA site.
    88
    99.. :doctest:
    10 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     10.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1111
    1212.. contents::
     
    1515=======
    1616
    17 :class:`SIRPQuery`
     17:class:`KOFAQuery`
    1818------------------
    1919
    20 .. class:: SIRPQuery()
     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, `SIRPQuery` 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 SIRPQuery 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.sirp.catalog.SIRPQuery 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 SIRPQuery (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 ``SIRPQuery``:
     206``KOFAQuery``:
    207207
    208208    >>> r2 = q.searchResults(subquery1)
  • main/waeup.kofa/trunk/src/waeup/kofa/configuration.py

    r7314 r7811  
    2222from zope.component.interfaces import IFactory
    2323from zope.interface import implementedBy
    24 from waeup.sirp.interfaces import (
     24from waeup.kofa.interfaces import (
    2525    ISessionConfiguration, IConfigurationContainer, ISessionConfigurationAdd,
    2626    academic_sessions_vocab)
    27 from waeup.sirp.utils.helpers import attrs_to_fields
     27from waeup.kofa.utils.helpers import attrs_to_fields
    2828
    2929class ConfigurationContainer(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/configure.zcml

    r7667 r7811  
    33           xmlns:i18n="http://namespaces.zope.org/i18n">
    44  <include package="grok" />
    5   <include package="waeup.sirp" file="meta.zcml" />
     5  <include package="waeup.kofa" file="meta.zcml" />
    66  <includeDependencies package="." />
    77  <grok:grok package="." />
    88  <i18n:registerTranslations directory="locales" />
    99
    10   <includeOverrides package="waeup.sirp.utils" file="overrides.zcml" />
     10  <includeOverrides package="waeup.kofa.utils" file="overrides.zcml" />
    1111</configure>
  • main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py

    r7585 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """SIRP data center.
     18"""KOFA data center.
    1919
    2020The waeup data center cares for management of upload data and provides
     
    2828from zope.component import getUtility
    2929from zope.component.interfaces import ObjectEvent
    30 from waeup.sirp.interfaces import (IDataCenter, IDataCenterFile,
     30from waeup.kofa.interfaces import (IDataCenter, IDataCenterFile,
    3131                                   IDataCenterStorageMovedEvent,
    3232                                   IDataCenterConfig)
    33 from waeup.sirp.utils.helpers import copy_filesystem_tree
    34 from waeup.sirp.utils.logger import Logger
     33from waeup.kofa.utils.helpers import copy_filesystem_tree
     34from waeup.kofa.utils.logger import Logger
    3535
    3636class DataCenter(grok.Container, Logger):
     
    3939    grok.implements(IDataCenter)
    4040
    41     logger_name = 'waeup.sirp.${sitename}.datacenter'
     41    logger_name = 'waeup.kofa.${sitename}.datacenter'
    4242    logger_filename = 'datacenter.log'
    4343
  • main/waeup.kofa/trunk/src/waeup/kofa/datacenter.txt

    r7584 r7811  
    1 SIRP Data Center
     1KOFA Data Center
    22****************
    33
    4 The SIRP 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.sirp.testing.SIRPUnitTestLayer
     7.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    88
    99Creating a data center
     
    1212A data center can be created easily:
    1313
    14     >>> from waeup.sirp.datacenter import DataCenter
     14    >>> from waeup.kofa.datacenter import DataCenter
    1515    >>> mydatacenter = DataCenter()
    1616    >>> mydatacenter
    17     <waeup.sirp.datacenter.DataCenter object at 0x...>
     17    <waeup.kofa.datacenter.DataCenter object at 0x...>
    1818
    1919Each data center has a location in file system where files are stored:
     
    7878
    7979    >>> mydatacenter.getFiles()
    80     [<waeup.sirp.datacenter.DataCenterFile object at 0x...>]
     80    [<waeup.kofa.datacenter.DataCenterFile object at 0x...>]
    8181
    8282As we can see, the actual file is wrapped by a convenience wrapper,
  • main/waeup.kofa/trunk/src/waeup/kofa/ftesting.zcml

    r7582 r7811  
    11<configure
    22   xmlns="http://namespaces.zope.org/zope"
    3    xmlns:sirp="http://namespaces.waeup.org/sirp"
    4    i18n_domain="waeup.sirp"
    5    package="waeup.sirp"
     3   xmlns:kofa="http://namespaces.waeup.org/kofa"
     4   i18n_domain="waeup.kofa"
     5   package="waeup.kofa"
    66   >
    77
    88  <include package="grok" />
    9   <includeOverrides package="waeup.sirp" />
    10   <include package="waeup.sirp" file="mail.zcml" />
     9  <includeOverrides package="waeup.kofa" />
     10  <include package="waeup.kofa" file="mail.zcml" />
    1111
    1212  <!-- Where should the datacenter reside by default? -->
    13   <sirp:datacenter
     13  <kofa:datacenter
    1414      path="../../../parts/test/datacenter" />
    1515
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/__init__.py

    r6963 r7811  
    22"""
    33# Make this a package.
    4 from waeup.sirp.hostels.container import HostelsContainer
    5 from waeup.sirp.hostels.hostel import Hostel, Bed
     4from waeup.kofa.hostels.container import HostelsContainer
     5from waeup.kofa.hostels.hostel import Hostel, Bed
    66
    77__all__ = [
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py

    r7718 r7811  
    2222from zope.i18n import translate
    2323from zope.component import getUtility
    24 from waeup.sirp.browser import (
    25     SIRPEditFormPage, SIRPAddFormPage, SIRPDisplayFormPage,
     24from waeup.kofa.browser import (
     25    KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
    2626    NullValidator)
    27 from waeup.sirp.browser.breadcrumbs import Breadcrumb
    28 from waeup.sirp.browser.resources import datepicker, datatable, tabs, warning
    29 from waeup.sirp.browser.layout import default_primary_nav_template
    30 from waeup.sirp.browser.pages import delSubobjects
    31 from waeup.sirp.browser.viewlets import (
     27from waeup.kofa.browser.breadcrumbs import Breadcrumb
     28from waeup.kofa.browser.resources import datepicker, datatable, tabs, warning
     29from waeup.kofa.browser.layout import default_primary_nav_template
     30from waeup.kofa.browser.pages import delSubobjects
     31from waeup.kofa.browser.viewlets import (
    3232    ManageActionButton, PrimaryNavTab)
    33 from waeup.sirp.browser.layout import jsaction, action
    34 from waeup.sirp.interfaces import ISIRPObject, ISIRPUtils
    35 from waeup.sirp.interfaces import MessageFactory as _
    36 from waeup.sirp.hostels.vocabularies import NOT_OCCUPIED
    37 from waeup.sirp.hostels.hostel import Hostel
    38 from waeup.sirp.hostels.interfaces import (
     33from waeup.kofa.browser.layout import jsaction, action
     34from waeup.kofa.interfaces import IKOFAObject, IKOFAUtils
     35from waeup.kofa.interfaces import MessageFactory as _
     36from waeup.kofa.hostels.vocabularies import NOT_OCCUPIED
     37from waeup.kofa.hostels.hostel import Hostel
     38from waeup.kofa.hostels.interfaces import (
    3939    IHostelsContainer, IHostel, IBed, IBedAllocateStudent)
    4040
    4141def write_log_message(view, message):
    42     ob_class = view.__implemented__.__name__.replace('waeup.sirp.','')
     42    ob_class = view.__implemented__.__name__.replace('waeup.kofa.','')
    4343    view.context.loggerInfo(ob_class, message)
    4444    return
     
    6161    """
    6262
    63     grok.context(ISIRPObject)
     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(SIRPDisplayFormPage):
     98class HostelsContainerPage(KOFADisplayFormPage):
    9999    """The standard view for hostels containers.
    100100    """
     
    113113    text = _('Manage accommodation section')
    114114
    115 class HostelsContainerManagePage(SIRPDisplayFormPage):
     115class HostelsContainerManagePage(KOFADisplayFormPage):
    116116    """The manage page for hostel containers.
    117117    """
     
    148148        return
    149149
    150 class HostelAddFormPage(SIRPAddFormPage):
     150class HostelAddFormPage(KOFAAddFormPage):
    151151    """Add-form to add a hostel.
    152152    """
     
    175175        return
    176176
    177 class HostelDisplayFormPage(SIRPDisplayFormPage):
     177class HostelDisplayFormPage(KOFADisplayFormPage):
    178178    """ Page to display hostel data
    179179    """
     
    196196    target = 'manage'
    197197
    198 class HostelManageFormPage(SIRPEditFormPage):
     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(ISIRPUtils).PORTAL_LANGUAGE
     263        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    264264        preferred_language = self.request.cookies.get(
    265             'sirp.language', portal_language)
     265            'kofa.language', portal_language)
    266266        for bed_id in child_id:
    267267            message = self.context[bed_id].switchReservation()
    268268            switched.append('%s (%s)' % (bed_id,message))
    269             m_translated = translate(message, 'waeup.sirp',
     269            m_translated = translate(message, 'waeup.kofa',
    270270                target_language=preferred_language)
    271271            switched_translated.append('%s (%s)' % (bed_id,m_translated))
     
    306306        return
    307307
    308 class BedManageFormPage(SIRPEditFormPage):
     308class BedManageFormPage(KOFAEditFormPage):
    309309    """ View to edit bed data
    310310    """
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt

    r7718 r7811  
    11<form action="." tal:attributes="action request/URL"
    2     i18n:domain="waeup.sirp"
     2    i18n:domain="waeup.kofa"
    33    method="POST" enctype="multipart/form-data">
    44  <table>
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt

    r7718 r7811  
    1 <div i18n:domain="waeup.sirp"
     1<div i18n:domain="waeup.kofa"
    22   i18n:translate="" tal:condition="python: not len(context.keys())">
    33There no subobjects registered yet.
    44</div>
    55
    6 <table i18n:domain="waeup.sirp">
     6<table i18n:domain="waeup.kofa">
    77  <thead>
    88    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <ul class="tabs" data-tabs="tabs">
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/catalog.py

    r7257 r7811  
    2020import grok
    2121from grok import index
    22 from waeup.sirp.interfaces import IUniversity
    23 from waeup.sirp.hostels.interfaces import IBed
     22from waeup.kofa.interfaces import IUniversity
     23from waeup.kofa.hostels.interfaces import IBed
    2424
    2525class BedIndexes(grok.Indexes):
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/container.py

    r7652 r7811  
    2020"""
    2121import grok
    22 from waeup.sirp.hostels.interfaces import IHostelsContainer, IHostel
    23 from waeup.sirp.utils.logger import Logger
     22from waeup.kofa.hostels.interfaces import IHostelsContainer, IHostel
     23from waeup.kofa.utils.logger import Logger
    2424
    2525class HostelsContainer(grok.Container, Logger):
     
    4848        return
    4949
    50     logger_name = 'waeup.sirp.${sitename}.hostels'
     50    logger_name = 'waeup.kofa.${sitename}.hostels'
    5151    logger_filename = 'hostels.log'
    5252
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py

    r7718 r7811  
    2222from zope.event import notify
    2323from datetime import datetime
    24 from waeup.sirp.utils.helpers import attrs_to_fields
    25 from waeup.sirp.hostels.vocabularies import NOT_OCCUPIED
    26 from waeup.sirp.hostels.interfaces import IHostel, IBed, IBedAllocateStudent
    27 from waeup.sirp.students.interfaces import IBedTicket
    28 from waeup.sirp.interfaces import MessageFactory as _
     24from waeup.kofa.utils.helpers import attrs_to_fields
     25from waeup.kofa.hostels.vocabularies import NOT_OCCUPIED
     26from waeup.kofa.hostels.interfaces import IHostel, IBed, IBedAllocateStudent
     27from waeup.kofa.students.interfaces import IBedTicket
     28from waeup.kofa.interfaces import MessageFactory as _
    2929
    3030class Hostel(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py

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

    r7802 r7811  
    3030from zope.catalog.interfaces import ICatalog
    3131from zope.component import queryUtility
    32 from waeup.sirp.app import University
    33 from waeup.sirp.hostels.interfaces import (
     32from waeup.kofa.app import University
     33from waeup.kofa.hostels.interfaces import (
    3434    IHostelsContainer, IHostel, IBed)
    35 from waeup.sirp.hostels.container import HostelsContainer
    36 from waeup.sirp.hostels.hostel import Hostel, Bed
    37 from waeup.sirp.testing import (FunctionalLayer, FunctionalTestCase)
    38 from waeup.sirp.students.student import Student
    39 from waeup.sirp.students.accommodation import BedTicket
    40 from waeup.sirp.university.department import Department
     35from waeup.kofa.hostels.container import HostelsContainer
     36from waeup.kofa.hostels.hostel import Hostel, Bed
     37from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase)
     38from waeup.kofa.students.student import Student
     39from waeup.kofa.students.accommodation import BedTicket
     40from waeup.kofa.university.department import Department
    4141
    4242class HostelsContainerTestCase(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py

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

    r7495 r7811  
    1 waeup.sirp.image -- handling image files
     1waeup.kofa.image -- handling image files
    22========================================
    33
    4 The image file widget is built on top of the :class:`SIRPImageFile` object::
    5 
    6   >>> from waeup.sirp.image import SIRPImageFile
    7   >>> file = SIRPImageFile('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 SIRPImageFile 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 SIRPImageFile 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 = SIRPImageFile('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 = SIRPImageFile('foo.jpg', 'data')
     104  >>> file = KOFAImageFile('foo.jpg', 'data')
    105105  >>> f = file.file
    106106  >>> f.read()
     
    114114  >>> shutil.rmtree(dirpath)
    115115
    116 Support for :mod:`waeup.sirp.imagestorage`
     116Support for :mod:`waeup.kofa.imagestorage`
    117117------------------------------------------
    118118
    119119The behaviour shown above can be used for any Zope3 application. With
    120 :mod:`waeup.sirp` we use a special file retrieval utility defined in
    121 :mod:`waeup.sirp.imagestorage`. As this utility is based on
    122 :mod:`waeup.sirp` internal stuff we do not show it here but in the
     120:mod:`waeup.kofa` we use a special file retrieval utility defined in
     121:mod:`waeup.kofa.imagestorage`. As this utility is based on
     122:mod:`waeup.kofa` internal stuff we do not show it here but in the
    123123tests that come with that storage type.
    124124
     
    135135The `ImageFile` field accepts only certain content types:
    136136
    137   >>> from waeup.sirp.image.schema import ImageFile
     137  >>> from waeup.kofa.image.schema import ImageFile
    138138  >>> from zope.publisher.browser import TestRequest
    139139  >>> field = ImageFile(__name__='foo', title=u'Foo')
     
    141141  Traceback (most recent call last):
    142142  ...
    143   WrongType: ('asd', <class 'waeup.sirp.image.image.SIRPImageFile'>, 'foo')
     143  WrongType: ('asd', <class 'waeup.kofa.image.image.KOFAImageFile'>, 'foo')
    144144
    145145which means: `ImageFile` fields should better contain
    146 :class:`SIRPImageFile` instances.
    147 
    148 We can store normal :class:`SIRPImageFile` instances:
    149 
    150   >>> field.validate(SIRPImageFile('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   ...     SIRPImageFile('bar.jpg', '123456789012')) is None
    176   True
    177 
    178   >>> field.validate(
    179   ...     SIRPImageFile('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   ...     SIRPImageFile('bar.jpg', '1234567890123'))
     185  ...     KOFAImageFile('bar.jpg', '1234567890123'))
    186186  Traceback (most recent call last):
    187187  ...
     
    189189
    190190  >>> field.validate(
    191   ...     SIRPImageFile('bar.jpg', '1234'))
     191  ...     KOFAImageFile('bar.jpg', '1234'))
    192192  Traceback (most recent call last):
    193193  ...
     
    198198----------------------------
    199199
    200 SIRPImageFile does not reproduce the broken unequal comparison from
     200KOFAImageFile does not reproduce the broken unequal comparison from
    201201its base:
    202202
    203   >>> f1 = SIRPImageFile('bar.jpg', '123456789')
    204   >>> f2 = SIRPImageFile('bar.jpg', '123456789')
    205   >>> f3 = SIRPImageFile('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

    r7321 r7811  
    33Includings schemas, widgets and the content components.
    44"""
    5 from waeup.sirp.image.image import SIRPImageFile, createSIRPImageFile
     5from waeup.kofa.image.image import KOFAImageFile, createKOFAImageFile
    66
    77__all__ = [
    8     "SIRPImageFile",
    9     "createSIRPImageFile",
     8    "KOFAImageFile",
     9    "createKOFAImageFile",
    1010    ]
  • main/waeup.kofa/trunk/src/waeup/kofa/image/browser/__init__.py

    r7137 r7811  
    11# The public API part
    22# Contains the widgets defined for image files.
    3 from waeup.sirp.image.browser.widget import (
     3from waeup.kofa.image.browser.widget import (
    44    EncodingImageFileWidget, ThumbnailWidget,
    55    )
  • main/waeup.kofa/trunk/src/waeup/kofa/image/browser/tests/image.txt

    r7321 r7811  
    1212
    1313  >>> import os
    14   >>> from waeup.sirp.image import SIRPImageFile
     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 = SIRPImageFile('foo.jpg', open(testimage, 'rb').read())
     17  >>> some_file = KOFAImageFile('foo.jpg', open(testimage, 'rb').read())
    1818  >>> some_file.filename
    1919  'foo.jpg'
     
    2626  >>> from hurry.file.browser import DownloadWidget
    2727  >>> from hurry.file.schema import File
    28   >>> from waeup.sirp.image.schema import ImageFile
     28  >>> from waeup.kofa.image.schema import ImageFile
    2929  >>> from zope.publisher.browser import TestRequest
    3030  >>> field = ImageFile(__name__='foo', title=u'Foo')
     
    5151Instead of downloading, we can also use a thumbnail widget:
    5252
    53   >>> from waeup.sirp.image.browser import ThumbnailWidget
     53  >>> from waeup.kofa.image.browser import ThumbnailWidget
    5454  >>> request = TestRequest(form={'field.foo': FileUpload(some_file)})
    5555  >>> widget = ThumbnailWidget(field, request)
     
    6161data already available, and no data in request:
    6262
    63   >>> from waeup.sirp.image.browser import EncodingImageFileWidget
     63  >>> from waeup.kofa.image.browser import EncodingImageFileWidget
    6464  >>> field = ImageFile(__name__='foo', title=u'Foo', required=False)
    6565  >>> field = field.bind(None)
     
    166166prepare some new file:
    167167
    168   >>> another_file = SIRPImageFile('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.sirp.image.SIRPImageFile` 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 = SIRPImageFile(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 SIRPImageFile object with that
     262file retrieval and then create a KOFAImageFile object with that
    263263file_id stored:
    264264
    265   >>> from waeup.sirp.image import createSIRPImageFile
    266   >>> image = createSIRPImageFile(
     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 createSIRPImageFile 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/tests/test_views.py

    r7137 r7811  
    3030from hurry.file.file import IdFileRetrieval
    3131from hurry.file.interfaces import IFileRetrieval
    32 from waeup.sirp.image.browser.views import HurryFileView
     32from waeup.kofa.image.browser.views import HurryFileView
    3333from zope.component import getMultiAdapter, provideUtility
    3434from zope.publisher.browser import TestRequest
     
    4141class ImageBrowserViewsLayer(object):
    4242    """A layer that registers all components in
    43        `waeup.sirp.image.browser.views` module.
     43       `waeup.kofa.image.browser.views` module.
    4444    """
    4545    @classmethod
    4646    def setUp(cls):
    47         grok.testing.grok('waeup.sirp.image.browser.views')
     47        grok.testing.grok('waeup.kofa.image.browser.views')
    4848
    4949    @classmethod
  • main/waeup.kofa/trunk/src/waeup/kofa/image/browser/widget.py

    r7321 r7811  
    1919"""
    2020import os
    21 from waeup.sirp.image import SIRPImageFile
     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 SIRPImageFile(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 SIRPImageFile(filename, filedata)
     145        return KOFAImageFile(filename, filedata)
    146146
    147147class ThumbnailWidget(DownloadWidget):
  • main/waeup.kofa/trunk/src/waeup/kofa/image/image.py

    r7321 r7811  
    2323from zope.component import getUtility
    2424from zope.interface import implements
    25 from waeup.sirp.image.interfaces import ISIRPImageFile
     25from waeup.kofa.image.interfaces import IKOFAImageFile
    2626
    27 class SIRPImageFile(HurryFile):
     27class KOFAImageFile(HurryFile):
    2828    """A file prepared for storing image files.
    2929
     
    3232    regular hurry files.
    3333
    34     To create a :class:`SIRPImageFile` you should use
    35     :func:`createSIRPImageFile`.
     34    To create a :class:`KOFAImageFile` you should use
     35    :func:`createKOFAImageFile`.
    3636    """
    37     implements(ISIRPImageFile)
     37    implements(IKOFAImageFile)
    3838
    3939    def __ne__(self, other):
     
    4545            return True
    4646
    47 def createSIRPImageFile(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

    r7321 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Interfaces for waeup.sirp.image
     18"""Interfaces for waeup.kofa.image
    1919"""
    2020from hurry.file.interfaces import IFile, IFileRetrieval, IHurryFile
     
    2323    """Image file field.
    2424    """
    25    
    26 class ISIRPImageFile(IHurryFile):
     25
     26class IKOFAImageFile(IHurryFile):
    2727    """Image file.
    2828    """
    29    
     29
    3030class IImageFileRetrieval(IFileRetrieval):
    3131    """A file retrieval for images.
  • main/waeup.kofa/trunk/src/waeup/kofa/image/schema.py

    r7321 r7811  
    2222from zope.schema.interfaces import TooBig, TooSmall
    2323from hurry.file.schema import File
    24 from waeup.sirp.image.interfaces import IImageFile
    25 from waeup.sirp.image.image import SIRPImageFile
     24from waeup.kofa.image.interfaces import IImageFile
     25from waeup.kofa.image.image import KOFAImageFile
    2626
    2727class MinMaxSize(object):
     
    8282    implements(IImageFile)
    8383
    84     _type = SIRPImageFile
     84    _type = KOFAImageFile
  • main/waeup.kofa/trunk/src/waeup/kofa/imagestorage.py

    r7193 r7811  
    1818"""A storage for image (and other) files.
    1919
    20 A few words about storing files with ``waeup.sirp``. The need for this
     20A few words about storing files with ``waeup.kofa``. The need for this
    2121feature arised initially from the need to store passport files for
    2222applicants and students. These files are dynamic (can be changed
     
    5757:class:`ExtFileStore`. An instance of this file storage (which is also
    5858able to store non-image files) is available at runtime as a global
    59 utility implementing :class:`waeup.sirp.interfaces.IExtFileStore`.
     59utility implementing :class:`waeup.kofa.interfaces.IExtFileStore`.
    6060
    6161The main task of this central component is to maintain a filesystem
     
    6868  >>> from StringIO import StringIO
    6969  >>> from zope.component import getUtility
    70   >>> from waeup.sirp.interfaces import IExtFileStore
     70  >>> from waeup.kofa.interfaces import IExtFileStore
    7171  >>> store = getUtility(IExtFileStore)
    7272  >>> store.createFile('myfile.txt', StringIO('some file content'))
     
    120120
    121121Examples for such a file store handler can be found in the
    122 :mod:`waeup.sirp.applicants.applicant` module. Please see also the
     122:mod:`waeup.kofa.applicants.applicant` module. Please see also the
    123123:class:`DefaultFileStoreHandler` class below for more details.
    124124
    125125The file store looks up handlers by utility lookups: it looks for a
    126126named utiliy providing
    127 :class:`waeup.sirp.interfaces.IFileStoreHandler` and named like the
     127:class:`waeup.kofa.interfaces.IFileStoreHandler` and named like the
    128128marker string (without leading/trailing underscores) in lower
    129129case. For example if the file id would be
     
    135135  ``img_user``
    136136
    137 and provide :class:`waeup.sirp.interfaces.IFileStoreHandler`. If no
     137and provide :class:`waeup.kofa.interfaces.IFileStoreHandler`. If no
    138138such utility can be found, a default handler is used instead
    139139(see :class:`DefaultFileStoreHandler`).
     
    141141**About File IDs and Filenames**
    142142
    143 In the waeup.sirp package we want to store documents like CVs,
     143In the waeup.kofa package we want to store documents like CVs,
    144144photographs, and similar. Each of this documents might come into the
    145145system with different filename extensions. This could be a problem as
     
    193193something like:
    194194
    195   >>> from waeup.sirp.interfaces import IFileStoreNameChooser
     195  >>> from waeup.kofa.interfaces import IFileStoreNameChooser
    196196  >>> file_id = IFileStoreNameChooser(my_context_obj)
    197197
     
    218218from zope.component import queryUtility
    219219from zope.interface import Interface
    220 from waeup.sirp.interfaces import (
     220from waeup.kofa.interfaces import (
    221221    IFileStoreNameChooser, IExtFileStore, IFileStoreHandler,)
    222222
     
    229229    special type of context.
    230230
    231     Provides the :class:`waeup.sirp.interfaces.IFileStoreNameChooser`
     231    Provides the :class:`waeup.kofa.interfaces.IFileStoreNameChooser`
    232232    interface.
    233233
     
    285285    want to change this path -- it is dynamic. That means, if you call
    286286    the file store from 'within' a site, the root path will be located
    287     inside this site (a :class:`waeup.sirp.University` instance). If
     287    inside this site (a :class:`waeup.kofa.University` instance). If
    288288    you call it from 'outside' a site some temporary dir (always the
    289289    same during lifetime of the file store instance) will be used. The
     
    299299
    300300    An ExtFileStore instance is available as a global utility
    301     implementing :class:`waeup.sirp.interfaces.IExtFileStore`.
     301    implementing :class:`waeup.kofa.interfaces.IExtFileStore`.
    302302
    303303    To add and retrieve files from the storage, use the appropriate
     
    505505
    506506    Registered globally as utility for
    507     :class:`waeup.sirp.interfaces.IFileStoreHandler`.
     507    :class:`waeup.kofa.interfaces.IFileStoreHandler`.
    508508    """
    509509    grok.implements(IFileStoreHandler)
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r7799 r7811  
    3434from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
    3535
    36 _ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.sirp')
     36_ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.kofa')
    3737
    3838CREATED = 'created'
     
    5050        encoding='utf-8', mode='rb').read()
    5151
    52 def SimpleSIRPVocabulary(*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 = SimpleSIRPVocabulary(*academic_sessions())
    69 
    70 registration_states_vocab = SimpleSIRPVocabulary(
     68academic_sessions_vocab = SimpleKOFAVocabulary(*academic_sessions())
     69
     70registration_states_vocab = SimpleKOFAVocabulary(
    7171    (_('created'), CREATED),
    7272    (_('admitted'), ADMITTED),
     
    139139    def getValues(self):
    140140        # late import: in interfaces we should not import local modules
    141         from waeup.sirp.permissions import get_waeup_role_names
     141        from waeup.kofa.permissions import get_waeup_role_names
    142142        return get_waeup_role_names()
    143143
    144144    def getTitle(self, value):
    145145        # late import: in interfaces we should not import local modules
    146         from waeup.sirp.permissions import get_all_roles
     146        from waeup.kofa.permissions import get_all_roles
    147147        roles = dict(get_all_roles())
    148148        if value in roles.keys():
     
    160160            # we have to 'try' because IConfiguration can only handle
    161161            # interfaces from w.s.interface.
    162             from waeup.sirp.browser.interfaces import ICaptchaManager
     162            from waeup.kofa.browser.interfaces import ICaptchaManager
    163163        except:
    164164            return captchas
     
    187187    """
    188188
    189 class ISIRPUtils(Interface):
     189class IKOFAUtils(Interface):
    190190    """A collection of methods which are subject to customization.
    191191    """
     
    222222        """
    223223
    224 class ISIRPObject(Interface):
    225     """A SIRP object.
     224class IKOFAObject(Interface):
     225    """A KOFA object.
    226226
    227227    This is merely a marker interface.
    228228    """
    229229
    230 class IUniversity(ISIRPObject):
     230class IUniversity(IKOFAObject):
    231231    """Representation of a university.
    232232    """
    233233
    234234
    235 class ISIRPContainer(ISIRPObject):
    236     """A container for SIRP objects.
    237     """
    238 
    239 class ISIRPContained(ISIRPObject):
    240     """An item contained in an ISIRPContainer.
     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 ISIRPExporter(Interface):
     269class IKOFAExporter(Interface):
    270270    """An exporter for objects.
    271271    """
     
    279279        """
    280280
    281 class ISIRPXMLExporter(Interface):
     281class IKOFAXMLExporter(Interface):
    282282    """An XML exporter for objects.
    283283    """
     
    291291        """
    292292
    293 class ISIRPXMLImporter(Interface):
     293class IKOFAXMLImporter(Interface):
    294294    """An XML import for objects.
    295295    """
     
    328328        """
    329329
    330 class IContactForm(ISIRPObject):
     330class IContactForm(IKOFAObject):
    331331    """A contact form.
    332332    """
     
    358358        required = True,)
    359359
    360 class ISIRPPrincipalInfo(IPrincipalInfo):
    361     """Infos about principals that are users of SIRP SIRP.
     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 ISIRPPrincipal(IPrincipal):
    368     """A principle for SIRP SIRP.
     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(ISIRPObject):
     384class IUserAccount(IKOFAObject):
    385385    """A user account.
    386386    """
     
    425425
    426426
    427 class IUsersContainer(ISIRPObject):
     427class IUsersContainer(IKOFAObject):
    428428    """A container for users (principals).
    429429
     
    450450        """
    451451
    452 class IConfigurationContainer(ISIRPObject):
     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.SIRP',
     464        default = u'WAeUP.KOFA',
    465465        required = True,
    466466        )
     
    469469        title = u'Skin',
    470470        default = u'gray waeup theme',
    471         vocabulary = 'waeup.sirp.browser.theming.ThemesVocabulary',
     471        vocabulary = 'waeup.kofa.browser.theming.ThemesVocabulary',
    472472        required = True,
    473473        )
     
    516516    email_subject = schema.TextLine(
    517517        title = u'Subject of Email to Administrator',
    518         default = u'SIRP Contact',
     518        default = u'KOFA Contact',
    519519        required = False,
    520520        )
     
    539539        )
    540540
    541 class ISessionConfiguration(ISIRPObject):
     541class ISessionConfiguration(IKOFAObject):
    542542    """A session configuration object.
    543543    """
     
    606606    'academic_session'].order
    607607
    608 class IDataCenter(ISIRPObject):
     608class IDataCenter(IKOFAObject):
    609609    """A data center.
    610610
     
    669669        title = u'Longer description of the item found.')
    670670
    671 class ISIRPPluggable(Interface):
    672     """A component that might be plugged into a SIRP SIRP 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
    675675    'plugins'. They are normally called when a new
    676     :class:`waeup.sirp.app.University` instance is created.
     676    :class:`waeup.kofa.app.University` instance is created.
    677677
    678678    Plugins can setup and update parts of the central site without the
    679     site object (normally a :class:`waeup.sirp.app.University` object)
     679    site object (normally a :class:`waeup.kofa.app.University` object)
    680680    needing to know about that parts. The site simply collects all
    681681    available plugins, calls them and the plugins care for their
     
    730730    Utilities providing this interface are looked up when a Pluggable
    731731    Authentication Utility (PAU) for any
    732     :class:`waeup.sirp.app.University` instance is created and put
     732    :class:`waeup.kofa.app.University` instance is created and put
    733733    into ZODB.
    734734
     
    807807        """
    808808
    809 class ISIRPWorkflowInfo(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 SIRPLoggers")
     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 SIRP 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 SIRPImageFile 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

    r7678 r7811  
    2121from zope.publisher.interfaces.browser import IBrowserRequest
    2222from zope.i18n.interfaces import IUserPreferredLanguages
    23 from waeup.sirp.configuration import ConfigurationContainer
    24 from waeup.sirp.interfaces import ISIRPUtils
     23from waeup.kofa.configuration import ConfigurationContainer
     24from waeup.kofa.interfaces import IKOFAUtils
    2525
    26 class SIRPLanguage(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(ISIRPUtils).PORTAL_LANGUAGE
     32        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    3333
    3434        # This an adapter for the request, so self.context is the request.
     
    3636
    3737        # Extract the preferred language from a cookie:
    38         lang = request.cookies.get('sirp.language', portal_language)
     38        lang = request.cookies.get('kofa.language', portal_language)
    3939
    4040        # According to IUserPreferredLanguages, we must return a list.
  • main/waeup.kofa/trunk/src/waeup/kofa/mail.zcml

    r7470 r7811  
    2929   background thread and sends mail independently from requests.
    3030
    31    By default in SIRP we have a fake mailer activated, that does not
     31   By default in KOFA we have a fake mailer activated, that does not
    3232   send real mail to the outside world.
    3333  -->
  • main/waeup.kofa/trunk/src/waeup/kofa/meta.py

    r7653 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Grokkers for SIRP components.
     18"""Grokkers for KOFA components.
    1919
    2020Stuff in here is mainly taken from grok.meta, with some modifications
     
    4040from martian.error import GrokError
    4141from zope import component
    42 from waeup.sirp.interfaces import IObjectUpgradeEvent
     42from waeup.kofa.interfaces import IObjectUpgradeEvent
    4343
    4444class IndexesGrokker(martian.InstanceGrokker):
     
    6161            return False
    6262
    63         subscriber = SIRPIndexesUpgradeSubscriber(
     63        subscriber = KOFAIndexesUpgradeSubscriber(
    6464            catalog_name, indexes, context, module_info)
    6565        subscribed = (site, IObjectUpgradeEvent)
     
    7272
    7373
    74 class SIRPIndexesUpgradeSubscriber(IndexesSetupSubscriber):
     74class KOFAIndexesUpgradeSubscriber(IndexesSetupSubscriber):
    7575    """Helper that sets up indexes when their Grok site is upgraded.
    7676
  • main/waeup.kofa/trunk/src/waeup/kofa/meta.zcml

    r7576 r7811  
    1111
    1212  <meta:directive
    13       namespace="http://namespaces.waeup.org/sirp"
     13      namespace="http://namespaces.waeup.org/kofa"
    1414      name="datacenter"
    1515      schema=".zcml.IDataCenterConfig"
  • main/waeup.kofa/trunk/src/waeup/kofa/objecthistory.py

    r7690 r7811  
    2222from zope.i18n import translate
    2323from zope.annotation.interfaces import IAnnotations
    24 from waeup.sirp.interfaces import IObjectHistory, ISIRPObject, ISIRPUtils
    25 from waeup.sirp.utils.helpers import get_current_principal
     24from waeup.kofa.interfaces import IObjectHistory, IKOFAObject, IKOFAUtils
     25from waeup.kofa.utils.helpers import get_current_principal
    2626
    27 from waeup.sirp.interfaces import MessageFactory as _
     27from waeup.kofa.interfaces import MessageFactory as _
    2828
    2929class ObjectHistory(grok.Adapter):
    3030    """A history for objects.
    3131
    32     For any object implementing `ISIRPObject` 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(ISIRPObject)
     36    grok.context(IKOFAObject)
    3737    grok.implements(IObjectHistory)
    3838
     
    6868        else:
    6969            user = user.title
    70         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     70        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    7171        by = 'by'
    7272        if portal_language != 'en':
    73             by = translate(_('by'),'waeup.sirp',target_language=portal_language)
    74             msg = translate(msg,'waeup.sirp',target_language=portal_language)
     73            by = translate(_('by'),'waeup.kofa',target_language=portal_language)
     74            msg = translate(msg,'waeup.kofa',target_language=portal_language)
    7575        msg = u'%s - %s %s %s' % (timestamp, msg, by, user)
    7676        msgs.append(msg)
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/__init__.py

    r6864 r7811  
    22"""
    33# Make this a package.
    4 from waeup.sirp.payments.container import PaymentsContainer
    5 from waeup.sirp.payments.payment import SCPayment, OnlinePayment
     4from waeup.kofa.payments.container import PaymentsContainer
     5from waeup.kofa.payments.payment import SCPayment, OnlinePayment
    66
    77__all__ = [
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/container.py

    r7195 r7811  
    2121import grok
    2222from grok import index
    23 from waeup.sirp.payments.interfaces import IPaymentsContainer
    24 from waeup.sirp.utils.helpers import attrs_to_fields
     23from waeup.kofa.payments.interfaces import IPaymentsContainer
     24from waeup.kofa.utils.helpers import attrs_to_fields
    2525
    2626class PaymentsContainer(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py

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

    r7627 r7811  
    2222from datetime import datetime
    2323from grok import index
    24 from waeup.sirp.payments.interfaces import (
     24from waeup.kofa.payments.interfaces import (
    2525    IPayment, ISCPayment, IOnlinePayment,
    2626    payment_states, payment_categories)
    27 from waeup.sirp.utils.helpers import attrs_to_fields
     27from waeup.kofa.utils.helpers import attrs_to_fields
    2828
    2929class Payment(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/tests.py

    r7195 r7811  
    2020"""
    2121from zope.interface.verify import verifyClass, verifyObject
    22 from waeup.sirp.payments.interfaces import (
     22from waeup.kofa.payments.interfaces import (
    2323    IPaymentsContainer, ISCPayment, IOnlinePayment)
    24 from waeup.sirp.payments.container import PaymentsContainer
    25 from waeup.sirp.payments.payment import (
     24from waeup.kofa.payments.container import PaymentsContainer
     25from waeup.kofa.payments.payment import (
    2626    SCPayment, OnlinePayment)
    27 from waeup.sirp.testing import (FunctionalLayer, FunctionalTestCase)
     27from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase)
    2828
    2929class PaymentsContainerTestCase(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/permissions.py

    r7335 r7811  
    2020from zope.interface import Interface
    2121from zope.securitypolicy.interfaces import IRole, IPrincipalRoleMap
    22 from waeup.sirp.interfaces import ILocalRolesAssignable
     22from waeup.kofa.interfaces import ILocalRolesAssignable
    2323
    2424class Public(grok.Permission):
     
    168168
    169169def get_waeup_roles(also_local=False):
    170     """Get all SIRP roles.
    171 
    172     SIRP 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 SIRP 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-SIRP 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 SIRP roles.
    192 
    193     See :func:`get_waeup_roles` for what a 'SIRPRole' is.
    194 
    195     This function returns a sorted list of SIRP 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

    r7334 r7811  
    1 SIRP permissions and roles
     1KOFA permissions and roles
    22**************************
    33
    4 Permissions and roles used in a SIRP portal.
     4Permissions and roles used in a KOFA portal.
    55
    66.. :doctest:
    7 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     7.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    88
    99Convenience functions
    1010=====================
    1111
    12 :mod:`waeup.sirp` offers some convenience functions to handle security
     12:mod:`waeup.kofa` offers some convenience functions to handle security
    1313roles.
    1414
     
    1616---------------------
    1717
    18 Gives us all roles defined in SIRP. We get tuples of
     18Gives us all roles defined in KOFA. We get tuples of
    1919kind
    2020
     
    2424with the ZCA (a string) and ``<ROLE>`` is the real role object.
    2525
    26     >>> from waeup.sirp.permissions import get_all_roles
     26    >>> from waeup.kofa.permissions import get_all_roles
    2727    >>> get_all_roles()
    2828    <generator object...at 0x...>
    2929
    3030    >>> sorted(list(get_all_roles()))
    31     [(u'waeup.ACManager', <waeup.sirp.permissions.ACManager object at 0x...]
     31    [(u'waeup.ACManager', <waeup.kofa.permissions.ACManager object at 0x...]
    3232
    3333:func:`get_waeup_roles`
    3434-----------------------
    3535
    36 Gives us all roles, except the SIRP 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
    39     >>> from waeup.sirp.permissions import get_waeup_roles
     39    >>> from waeup.kofa.permissions import get_waeup_roles
    4040    >>> len(list(get_waeup_roles()))
    4141    11
     
    4848----------------------------
    4949
    50 We can get all role names defined in SIRP (except 'local'
     50We can get all role names defined in KOFA (except 'local'
    5151roles that are meant not to be assigned globally):
    5252
    53     >>> from waeup.sirp.permissions import get_waeup_role_names
     53    >>> from waeup.kofa.permissions import get_waeup_role_names
    5454    >>> list(get_waeup_role_names())
    5555    [u'waeup.ACManager',
     
    7272they are not stored in the ZODB:
    7373
    74     >>> from waeup.sirp.permissions import get_users_with_local_roles
     74    >>> from waeup.kofa.permissions import get_users_with_local_roles
    7575    >>> mycontext = object()
    7676    >>> people_and_roles = get_users_with_local_roles(mycontext)
  • main/waeup.kofa/trunk/src/waeup/kofa/schema/__init__.py

    r7137 r7811  
    1 from waeup.sirp.schema.field import *
     1from waeup.kofa.schema.field import *
    22
    33__all__ = tuple(name for name in globals() if not name.startswith('_'))
  • main/waeup.kofa/trunk/src/waeup/kofa/schema/tests/test_textlinechoice.py

    r7196 r7811  
    2525    IVocabulary, ISource, IContextSourceBinder,)
    2626from zope.schema.tests.test_strfield import TextLineTest
    27 from waeup.sirp.schema import TextLineChoice
     27from waeup.kofa.schema import TextLineChoice
    2828
    2929# Define some helper functions, classes, vars for tests
  • main/waeup.kofa/trunk/src/waeup/kofa/schoolgrades.py

    r7795 r7811  
    2323from zope.schema.fieldproperty import FieldProperty
    2424from zope.schema import Object
    25 from waeup.sirp.interfaces import IResultEntry, IResultEntryField
    26 from waeup.sirp.widgets.objectwidget import (
    27     SIRPObjectWidget, SIRPObjectDisplayWidget
     25from waeup.kofa.interfaces import IResultEntry, IResultEntryField
     26from waeup.kofa.widgets.objectwidget import (
     27    KOFAObjectWidget, KOFAObjectDisplayWidget
    2828    )
    2929
     
    5252        return
    5353
    54 # register SIRPObjectWidgets 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 SIRPObjectWidget(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 SIRPObjectDisplayWidget(obj, req, ResultEntry)
     64    return KOFAObjectDisplayWidget(obj, req, ResultEntry)
  • main/waeup.kofa/trunk/src/waeup/kofa/smtp.py

    r7476 r7811  
    1717##
    1818"""
    19 Email (SMTP) services for SIRP.
     19Email (SMTP) services for KOFA.
    2020
    2121Note About Encodings
     
    5151from zope.component import getUtility
    5252from zope.sendmail.interfaces import IMailDelivery
    53 from waeup.sirp.interfaces import IMailService
     53from waeup.kofa.interfaces import IMailService
    5454
    5555class DefaultMailService(grok.GlobalUtility):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/__init__.py

    r7592 r7811  
    22"""
    33# Make this a package.
    4 from waeup.sirp.students.student import (
     4from waeup.kofa.students.student import (
    55    Student, StudentFactory
    66    )
    7 from waeup.sirp.students.container import StudentsContainer
    8 from waeup.sirp.students.studycourse import StudentStudyCourse
    9 from waeup.sirp.students.payments import StudentPaymentsContainer
    10 from waeup.sirp.students.accommodation import StudentAccommodation
    11 from waeup.sirp.students.dynamicroles import StudentPrincipalRoleManager
     7from waeup.kofa.students.container import StudentsContainer
     8from waeup.kofa.students.studycourse import StudentStudyCourse
     9from waeup.kofa.students.payments import StudentPaymentsContainer
     10from waeup.kofa.students.accommodation import StudentAccommodation
     11from waeup.kofa.students.dynamicroles import StudentPrincipalRoleManager
    1212
    1313
  • main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py

    r7599 r7811  
    2323from zope.component.interfaces import IFactory
    2424from zope.interface import implementedBy
    25 from waeup.sirp.interfaces import academic_sessions_vocab
    26 from waeup.sirp.students.interfaces import (
     25from waeup.kofa.interfaces import academic_sessions_vocab
     26from waeup.kofa.students.interfaces import (
    2727    IStudentAccommodation, IStudentNavigation, IBedTicket)
    28 from waeup.sirp.utils.helpers import attrs_to_fields
     28from waeup.kofa.utils.helpers import attrs_to_fields
    2929
    3030class StudentAccommodation(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/authentication.py

    r7592 r7811  
    2828from zope.publisher.interfaces.http import IHTTPRequest
    2929from zope.session.interfaces import ISession
    30 from waeup.sirp.authentication import (
    31     SIRPPrincipalInfo, get_principal_role_manager)
    32 from waeup.sirp.interfaces import (
     30from waeup.kofa.authentication import (
     31    KOFAPrincipalInfo, get_principal_role_manager)
     32from waeup.kofa.interfaces import (
    3333    IAuthPluginUtility, IUserAccount, IPasswordValidator)
    34 from waeup.sirp.students.interfaces import IStudent
     34from waeup.kofa.students.interfaces import IStudent
    3535
    3636class StudentAccount(grok.Adapter):
     
    135135        if not account.checkPassword(credentials['password']):
    136136            return None
    137         return SIRPPrincipalInfo(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/batching.py

    r7656 r7811  
    3232from zope.catalog.interfaces import ICatalog
    3333from hurry.workflow.interfaces import IWorkflowState
    34 from waeup.sirp.interfaces import (
     34from waeup.kofa.interfaces import (
    3535    IBatchProcessor, FatalCSVError, IObjectConverter, IUserAccount,
    3636    IObjectHistory)
    37 from waeup.sirp.students.interfaces import (
     37from waeup.kofa.students.interfaces import (
    3838    IStudent, IStudentStudyCourse,
    3939    IStudentUpdateByRegNo, IStudentUpdateByMatricNo,
    4040    IStudentStudyLevel, ICourseTicket,
    4141    IStudentOnlinePayment)
    42 from waeup.sirp.students.workflow import  IMPORTABLE_STATES
    43 from waeup.sirp.utils.batching import BatchProcessor
     42from waeup.kofa.students.workflow import  IMPORTABLE_STATES
     43from waeup.kofa.utils.batching import BatchProcessor
    4444
    4545class StudentProcessor(BatchProcessor):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r7745 r7811  
    2929from zope.formlib.textwidgets import BytesDisplayWidget
    3030from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    31 from waeup.sirp.accesscodes import (
     31from waeup.kofa.accesscodes import (
    3232    invalidate_accesscode, get_access_code, create_accesscode)
    33 from waeup.sirp.accesscodes.workflow import USED
    34 from waeup.sirp.browser import (
    35     SIRPPage, SIRPEditFormPage, SIRPAddFormPage, SIRPDisplayFormPage,
    36     ContactAdminForm, SIRPForm)
    37 from waeup.sirp.browser.interfaces import ICaptchaManager
    38 from waeup.sirp.browser.breadcrumbs import Breadcrumb
    39 from waeup.sirp.browser.resources import datepicker, datatable, tabs, warning
    40 from waeup.sirp.browser.layout import jsaction, action, UtilityView
    41 from waeup.sirp.interfaces import (
    42     ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm,
    43     ISIRPUtils, IUniversity)
    44 from waeup.sirp.interfaces import MessageFactory as _
    45 from waeup.sirp.widgets.datewidget import (
     33from waeup.kofa.accesscodes.workflow import USED
     34from waeup.kofa.browser import (
     35    KOFAPage, KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
     36    ContactAdminForm, KOFAForm)
     37from waeup.kofa.browser.interfaces import ICaptchaManager
     38from waeup.kofa.browser.breadcrumbs import Breadcrumb
     39from waeup.kofa.browser.resources import datepicker, datatable, tabs, warning
     40from waeup.kofa.browser.layout import jsaction, action, UtilityView
     41from waeup.kofa.interfaces import (
     42    IKOFAObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm,
     43    IKOFAUtils, IUniversity)
     44from waeup.kofa.interfaces import MessageFactory as _
     45from waeup.kofa.widgets.datewidget import (
    4646    FriendlyDateWidget, FriendlyDateDisplayWidget,
    4747    FriendlyDatetimeDisplayWidget)
    48 from waeup.sirp.students.interfaces import (
     48from waeup.kofa.students.interfaces import (
    4949    IStudentsContainer, IStudent, IStudentClearance,
    5050    IStudentPersonal, IStudentBase, IStudentStudyCourse,
     
    5353    IStudentOnlinePayment, IBedTicket, IStudentsUtils, IStudentChangePassword
    5454    )
    55 from waeup.sirp.students.catalog import search
    56 from waeup.sirp.students.workflow import (ADMITTED, PAID,
     55from waeup.kofa.students.catalog import search
     56from waeup.kofa.students.workflow import (ADMITTED, PAID,
    5757    CLEARANCE, REQUESTED, RETURNING, CLEARED, REGISTERED, VALIDATED)
    58 from waeup.sirp.students.studylevel import StudentStudyLevel, CourseTicket
    59 from waeup.sirp.students.vocabularies import StudyLevelSource
    60 from waeup.sirp.browser.resources import toggleall
    61 from waeup.sirp.hostels.hostel import NOT_OCCUPIED
    62 from waeup.sirp.utils.helpers import get_current_principal
     58from waeup.kofa.students.studylevel import StudentStudyLevel, CourseTicket
     59from waeup.kofa.students.vocabularies import StudyLevelSource
     60from waeup.kofa.browser.resources import toggleall
     61from waeup.kofa.hostels.hostel import NOT_OCCUPIED
     62from waeup.kofa.utils.helpers import get_current_principal
    6363
    6464def write_log_message(view, message):
    65     ob_class = view.__implemented__.__name__.replace('waeup.sirp.','')
     65    ob_class = view.__implemented__.__name__.replace('waeup.kofa.','')
    6666    view.context.getStudent().loggerInfo(ob_class, message)
    6767    return
     
    155155    @property
    156156    def title(self):
    157         portal_language = getUtility(ISIRPUtils).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
    160         return translate(self.context.level_title, 'waeup.sirp',
     160        return translate(self.context.level_title, 'waeup.kofa',
    161161            target_language=portal_language)
    162162
    163 class StudentsContainerPage(SIRPPage):
     163class StudentsContainerPage(KOFAPage):
    164164    """The standard view for student containers.
    165165    """
     
    194194        return
    195195
    196 class StudentsContainerManagePage(SIRPPage):
     196class StudentsContainerManagePage(KOFAPage):
    197197    """The manage page for student containers.
    198198    """
     
    245245        return
    246246
    247 class StudentAddFormPage(SIRPAddFormPage):
     247class StudentAddFormPage(KOFAAddFormPage):
    248248    """Add-form to add a student.
    249249    """
     
    265265        return
    266266
    267 class StudentBaseDisplayFormPage(SIRPDisplayFormPage):
     267class StudentBaseDisplayFormPage(KOFADisplayFormPage):
    268268    """ Page to display student base data
    269269    """
     
    310310        usertype = getattr(self.request.principal,
    311311                           'user_type', 'system').title()
    312         sirp_utils = getUtility(ISIRPUtils)
    313         success = sirp_utils.sendContactForm(
     312        kofa_utils = getUtility(IKOFAUtils)
     313        success = kofa_utils.sendContactForm(
    314314                self.request.principal.title,email,
    315315                self.context.display_fullname,self.context.email,
     
    323323        return
    324324
    325 class StudentBaseManageFormPage(SIRPEditFormPage):
     325class StudentBaseManageFormPage(KOFAEditFormPage):
    326326    """ View to manage student base data
    327327    """
     
    388388        return
    389389
    390 class StudentClearanceDisplayFormPage(SIRPDisplayFormPage):
     390class StudentClearanceDisplayFormPage(KOFADisplayFormPage):
    391391    """ Page to display student clearance data
    392392    """
     
    415415    @property
    416416    def title(self):
    417         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    418         return translate(_('Clearance Data'), 'waeup.sirp',
     417        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     418        return translate(_('Clearance Data'), 'waeup.kofa',
    419419            target_language=portal_language)
    420420
    421421    @property
    422422    def label(self):
    423         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     423        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    424424        return translate(_('Clearance Slip of '),
    425             'waeup.sirp', target_language=portal_language) \
     425            'waeup.kofa', target_language=portal_language) \
    426426            + ' %s' % self.context.display_fullname
    427427
     
    434434            self.context.getStudent(), studentview)
    435435
    436 class StudentClearanceManageFormPage(SIRPEditFormPage):
     436class StudentClearanceManageFormPage(KOFAEditFormPage):
    437437    """ Page to edit student clearance data
    438438    """
     
    508508        return
    509509
    510 class StudentPersonalDisplayFormPage(SIRPDisplayFormPage):
     510class StudentPersonalDisplayFormPage(KOFADisplayFormPage):
    511511    """ Page to display student personal data
    512512    """
     
    523523            mapping = {'a':self.context.display_fullname})
    524524
    525 class StudentPersonalManageFormPage(SIRPEditFormPage):
     525class StudentPersonalManageFormPage(KOFAEditFormPage):
    526526    """ Page to edit student clearance data
    527527    """
     
    538538        return
    539539
    540 class StudyCourseDisplayFormPage(SIRPDisplayFormPage):
     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(ISIRPUtils).getStudyModesDict()
     558            studymodes_dict = getUtility(IKOFAUtils).getStudyModesDict()
    559559            return studymodes_dict[self.context.certificate.study_mode]
    560560        return
     
    572572        return
    573573
    574 class StudyCourseManageFormPage(SIRPEditFormPage):
     574class StudyCourseManageFormPage(KOFAEditFormPage):
    575575    """ Page to edit the student study course data
    576576    """
     
    645645        return
    646646
    647 class StudyLevelDisplayFormPage(SIRPDisplayFormPage):
     647class StudyLevelDisplayFormPage(KOFADisplayFormPage):
    648648    """ Page to display student study levels
    649649    """
     
    662662    @property
    663663    def label(self):
    664         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    665         lang = self.request.cookies.get('sirp.language', portal_language)
    666         level_title = translate(self.context.level_title, 'waeup.sirp',
     664        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     665        lang = self.request.cookies.get('kofa.language', portal_language)
     666        level_title = translate(self.context.level_title, 'waeup.kofa',
    667667            target_language=lang)
    668668        return _('${a}: Study Level ${b}', mapping = {
     
    688688    @property
    689689    def title(self):
    690         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    691         return translate(_('Level Data'), 'waeup.sirp',
     690        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     691        return translate(_('Level Data'), 'waeup.kofa',
    692692            target_language=portal_language)
    693693
    694694    @property
    695695    def content_title(self):
    696         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    697         return translate(_('Course List'), 'waeup.sirp',
     696        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     697        return translate(_('Course List'), 'waeup.kofa',
    698698            target_language=portal_language)
    699699
    700700    @property
    701701    def label(self):
    702         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    703         lang = self.request.cookies.get('sirp.language', portal_language)
    704         level_title = translate(self.context.level_title, 'waeup.sirp',
     702        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     703        lang = self.request.cookies.get('kofa.language', portal_language)
     704        level_title = translate(self.context.level_title, 'waeup.kofa',
    705705            target_language=lang)
    706706        return translate(_('Course Registration Slip  '),
    707             'waeup.sirp', target_language=portal_language) \
     707            'waeup.kofa', target_language=portal_language) \
    708708            + ' %s' % level_title
    709709
    710710    def render(self):
    711         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    712         Sem = translate(_('Sem.'), 'waeup.sirp', target_language=portal_language)
    713         Code = translate(_('Code'), 'waeup.sirp', target_language=portal_language)
    714         Title = translate(_('Title'), 'waeup.sirp', target_language=portal_language)
    715         Dept = translate(_('Dept.'), 'waeup.sirp', target_language=portal_language)
    716         Faculty = translate(_('Faculty'), 'waeup.sirp', target_language=portal_language)
    717         Cred = translate(_('Cred.'), 'waeup.sirp', target_language=portal_language)
    718         Mand = translate(_('Mand.'), 'waeup.sirp', target_language=portal_language)
    719         Score = translate(_('Score'), 'waeup.sirp', target_language=portal_language)
     711        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     712        Sem = translate(_('Sem.'), 'waeup.kofa', target_language=portal_language)
     713        Code = translate(_('Code'), 'waeup.kofa', target_language=portal_language)
     714        Title = translate(_('Title'), 'waeup.kofa', target_language=portal_language)
     715        Dept = translate(_('Dept.'), 'waeup.kofa', target_language=portal_language)
     716        Faculty = translate(_('Faculty'), 'waeup.kofa', target_language=portal_language)
     717        Cred = translate(_('Cred.'), 'waeup.kofa', target_language=portal_language)
     718        Mand = translate(_('Mand.'), 'waeup.kofa', target_language=portal_language)
     719        Score = translate(_('Score'), 'waeup.kofa', target_language=portal_language)
    720720        studentview = StudentBaseDisplayFormPage(self.context.getStudent(),
    721721            self.request)
     
    735735            tabledata=tabledata)
    736736
    737 class StudyLevelManageFormPage(SIRPEditFormPage):
     737class StudyLevelManageFormPage(KOFAEditFormPage):
    738738    """ Page to edit the student study level data
    739739    """
     
    762762    @property
    763763    def label(self):
    764         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    765         lang = self.request.cookies.get('sirp.language', portal_language)
    766         level_title = translate(self.context.level_title, 'waeup.sirp',
     764        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     765        lang = self.request.cookies.get('kofa.language', portal_language)
     766        level_title = translate(self.context.level_title, 'waeup.kofa',
    767767            target_language=lang)
    768768        return _('Manage study level ${a}',
     
    853853        return
    854854
    855 class CourseTicketAddFormPage(SIRPAddFormPage):
     855class CourseTicketAddFormPage(KOFAAddFormPage):
    856856    """Add a course ticket.
    857857    """
     
    890890        self.redirect(self.url(self.context))
    891891
    892 class CourseTicketDisplayFormPage(SIRPDisplayFormPage):
     892class CourseTicketDisplayFormPage(KOFADisplayFormPage):
    893893    """ Page to display course tickets
    894894    """
     
    906906            'b':self.context.code})
    907907
    908 class CourseTicketManageFormPage(SIRPEditFormPage):
     908class CourseTicketManageFormPage(KOFAEditFormPage):
    909909    """ Page to manage course tickets
    910910    """
     
    925925        return
    926926
    927 class PaymentsManageFormPage(SIRPEditFormPage):
     927class PaymentsManageFormPage(KOFAEditFormPage):
    928928    """ Page to manage the student payments
    929929
     
    982982        self.redirect(self.url(self.context, '@@addop'))
    983983
    984 class OnlinePaymentAddFormPage(SIRPAddFormPage):
     984class OnlinePaymentAddFormPage(KOFAAddFormPage):
    985985    """ Page to add an online payment ticket
    986986    """
     
    10391039        return
    10401040
    1041 class OnlinePaymentDisplayFormPage(SIRPDisplayFormPage):
     1041class OnlinePaymentDisplayFormPage(KOFADisplayFormPage):
    10421042    """ Page to view an online payment ticket
    10431043    """
     
    11381138
    11391139
    1140 class AccommodationManageFormPage(SIRPEditFormPage):
     1140class AccommodationManageFormPage(KOFAEditFormPage):
    11411141    """ Page to manage bed tickets.
    11421142
     
    11951195        return self.actions
    11961196
    1197 class BedTicketAddPage(SIRPPage):
     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(ISIRPUtils).PORTAL_LANGUAGE
     1289        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    12901290        bedticket.bed_coordinates = translate(
    1291             bc, 'waeup.sirp',target_language=portal_language)
     1291            bc, 'waeup.kofa',target_language=portal_language)
    12921292        key = str(acc_details['booking_session'])
    12931293        self.context[key] = bedticket
     
    12971297        return
    12981298
    1299 class BedTicketDisplayFormPage(SIRPDisplayFormPage):
     1299class BedTicketDisplayFormPage(KOFADisplayFormPage):
    13001300    """ Page to display bed tickets
    13011301    """
     
    13251325    @property
    13261326    def title(self):
    1327         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    1328         return translate(_('Bed Allocation Data'), 'waeup.sirp',
     1327        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     1328        return translate(_('Bed Allocation Data'), 'waeup.kofa',
    13291329            target_language=portal_language)
    13301330
    13311331    @property
    13321332    def label(self):
    1333         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     1333        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    13341334        return translate(_('Bed Allocation: '),
    1335             'waeup.sirp', target_language=portal_language) \
     1335            'waeup.kofa', target_language=portal_language) \
    13361336            + ' %s' % self.context.bed_coordinates
    13371337
     
    14051405            'c':room_nr, 'd':bed_nr,
    14061406            'e':new_bed.bed_type})
    1407         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     1407        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    14081408        self.context.bed_coordinates = translate(
    1409             bc, 'waeup.sirp',target_language=portal_language)
     1409            bc, 'waeup.kofa',target_language=portal_language)
    14101410        self.flash(_('Student relocated: ${a}',
    14111411            mapping = {'a':self.context.bed_coordinates}))
     
    14161416        return
    14171417
    1418 class StudentHistoryPage(SIRPPage):
     1418class StudentHistoryPage(KOFAPage):
    14191419    """ Page to display student clearance data
    14201420    """
     
    14311431# Pages for students only
    14321432
    1433 class StudentBaseEditFormPage(SIRPEditFormPage):
     1433class StudentBaseEditFormPage(KOFAEditFormPage):
    14341434    """ View to edit student base data
    14351435    """
     
    14471447        return
    14481448
    1449 class StudentChangePasswordPage(SIRPEditFormPage):
     1449class StudentChangePasswordPage(KOFAEditFormPage):
    14501450    """ View to manage student base data
    14511451    """
     
    14731473        return
    14741474
    1475 class StudentFilesUploadPage(SIRPPage):
     1475class StudentFilesUploadPage(KOFAPage):
    14761476    """ View to upload files by student
    14771477    """
     
    14901490        return
    14911491
    1492 class StartClearancePage(SIRPPage):
     1492class StartClearancePage(KOFAPage):
    14931493    grok.context(IStudent)
    14941494    grok.name('start_clearance')
     
    15931593        return
    15941594
    1595 class RequestClearancePage(SIRPPage):
     1595class RequestClearancePage(KOFAPage):
    15961596    grok.context(IStudent)
    15971597    grok.name('request_clearance')
     
    16241624        return
    16251625
    1626 class StartCourseRegistrationPage(SIRPPage):
     1626class StartCourseRegistrationPage(KOFAPage):
    16271627    grok.context(IStudentStudyCourse)
    16281628    grok.name('start_course_registration')
     
    16731673        return
    16741674
    1675 class AddStudyLevelFormPage(SIRPEditFormPage):
     1675class AddStudyLevelFormPage(KOFAEditFormPage):
    16761676    """ Page for students to add current study levels
    16771677    """
     
    17101710        return
    17111711
    1712 class StudyLevelEditFormPage(SIRPEditFormPage):
     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(ISIRPUtils).PORTAL_LANGUAGE
    1735         lang = self.request.cookies.get('sirp.language', portal_language)
    1736         level_title = translate(self.context.level_title, 'waeup.sirp',
     1734        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     1735        lang = self.request.cookies.get('kofa.language', portal_language)
     1736        level_title = translate(self.context.level_title, 'waeup.kofa',
    17371737            target_language=lang)
    17381738        return _('Add and remove course tickets of study level ${a}',
     
    18161816        return
    18171817
    1818 class ChangePasswordRequestPage(SIRPForm):
     1818class ChangePasswordRequestPage(KOFAForm):
    18191819    """Captcha'd page for students to request a password change.
    18201820    """
     
    18511851        student = list(results)[0]
    18521852        # Change password
    1853         sirp_utils = getUtility(ISIRPUtils)
    1854         pwd = sirp_utils.genPassword()
     1853        kofa_utils = getUtility(IKOFAUtils)
     1854        pwd = kofa_utils.genPassword()
    18551855        IUserAccount(student).setPassword(pwd)
    18561856        # Send email with new redentials
    18571857        msg = _('You have successfully changed your password for the')
    18581858        login_url = self.url(grok.getSite(), 'login')
    1859         success = sirp_utils.sendCredentials(
     1859        success = kofa_utils.sendCredentials(
    18601860            IUserAccount(student),pwd,login_url,msg)
    18611861        if success:
     
    18661866        return
    18671867
    1868 class SetPasswordPage(SIRPPage):
    1869     grok.context(ISIRPObject)
     1868class SetPasswordPage(KOFAPage):
     1869    grok.context(IKOFAObject)
    18701870    grok.name('setpassword')
    18711871    grok.require('waeup.Anonymous')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/accommodationmanagepage.pt

    r7735 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <table class="display dataTableManage">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/basemanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <ul class="tabs" data-tabs="tabs">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/basepage.pt

    r7735 r7811  
    1 <table i18n:domain="waeup.sirp" class="form-table">
     1<table i18n:domain="waeup.kofa" class="form-table">
    22  <tbody>
    33    <tal:block repeat="widget view/widgets">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/change_password.pt

    r7735 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <input type="hidden" name="student_id" value=""
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/changepw.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/clearanceeditpage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <ul class="tabs" data-tabs="tabs">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containermanagepage.pt

    r7735 r7811  
    1 <form method="POST" i18n:domain="waeup.sirp">
     1<form method="POST" i18n:domain="waeup.kofa">
    22<br />
    33  <input class="btn primary" type="submit" name="search"
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containerpage.pt

    r7735 r7811  
    1 <form method="POST" i18n:domain="waeup.sirp">
     1<form method="POST" i18n:domain="waeup.kofa">
    22<br />
    33  <input class="btn primary" type="submit" name="search"
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/courseticketmanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/courseticketpage.pt

    r7735 r7811  
    1 <table class="form-table" i18n:domain="waeup.sirp">
     1<table class="form-table" i18n:domain="waeup.kofa">
    22  <tbody>
    33    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/enterpin.pt

    r7735 r7811  
    1 <form method="POST" i18n:domain="waeup.sirp">
     1<form method="POST" i18n:domain="waeup.kofa">
    22  <table class="form-table">
    33    <tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/fileupload.pt

    r7735 r7811  
    1 <tr i18n:domain="waeup.sirp">
     1<tr i18n:domain="waeup.kofa">
    22  <td class="fieldname">
    33    <span tal:replace="viewlet/label">FILENAME</span>:
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/imageupload.pt

    r7738 r7811  
    1 <tr i18n:domain="waeup.sirp">
     1<tr i18n:domain="waeup.kofa">
    22  <td class="fieldname">
    33    <span tal:replace="viewlet/label">FILENAME</span>:
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/paymentsmanagepage.pt

    r7741 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <table class="display dataTableManage">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/setpassword.pt

    r7738 r7811  
    1 <form i18n:domain="waeup.sirp" method="POST">
     1<form i18n:domain="waeup.kofa" method="POST">
    22  <table class="form-table">
    33    <tbody>
     
    2929         tal:attributes="value view/set_button" />
    3030</form>
    31 <div i18n:domain="waeup.sirp" >
     31<div i18n:domain="waeup.kofa" >
    3232  <h3 i18n:translate="">Instructions:</h3>
    3333  <ul class="list" i18n:translate="">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studycoursemanagepage.pt

    r7738 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <ul class="tabs" data-tabs="tabs">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studycoursepage.pt

    r7738 r7811  
    1 <table class="form-table" i18n:domain="waeup.sirp">
     1<table class="form-table" i18n:domain="waeup.kofa">
    22  <thead>
    33  </thead>
     
    5050</table>
    5151
    52 <h3 i18n:domain="waeup.sirp" i18n:translate="">Study Levels (Course Lists)</h3>
     52<h3 i18n:domain="waeup.kofa" i18n:translate="">Study Levels (Course Lists)</h3>
    5353
    54 <table i18n:domain="waeup.sirp">
     54<table i18n:domain="waeup.kofa">
    5555  <thead>
    5656    <tr>
     
    7070
    7171<div tal:condition="python: not len(context.keys())"
    72     i18n:domain="waeup.sirp" i18n:translate="">
     72    i18n:domain="waeup.kofa" i18n:translate="">
    7373  There are no levels registered yet.
    7474</div>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studyleveladdpage.pt

    r7738 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <p i18n:translate="">Text to explain course registration procedure.</p>
     
    1010    </span>
    1111  </div>
    12 </form> 
     12</form>
    1313
    1414
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studyleveleditpage.pt

    r7738 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <h3 i18n:translate="">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studylevelmanagepage.pt

    r7738 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <ul class="tabs" data-tabs="tabs">
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studylevelpage.pt

    r7741 r7811  
    1 <table class="form-table" i18n:domain="waeup.sirp">
     1<table class="form-table" i18n:domain="waeup.kofa">
    22  <thead>
    33  </thead>
     
    2626</table>
    2727
    28 <h3 i18n:domain="waeup.sirp" i18n:translate="">Course Tickets</h3>
     28<h3 i18n:domain="waeup.kofa" i18n:translate="">Course Tickets</h3>
    2929
    30 <table class="display dataTable" i18n:domain="waeup.sirp">
     30<table class="display dataTable" i18n:domain="waeup.kofa">
    3131  <thead>
    3232    <tr>
     
    6262
    6363
    64 <div i18n:domain="waeup.sirp"
     64<div i18n:domain="waeup.kofa"
    6565  tal:condition="python: not len(context.keys())" i18n:translate="">
    6666  The're no tickets added yet.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/catalog.py

    r7692 r7811  
    2424from zope.catalog.interfaces import ICatalog
    2525from zope.component import queryUtility
    26 from waeup.sirp.interfaces import (
     26from waeup.kofa.interfaces import (
    2727    IUniversity, IQueryResultItem, academic_sessions_vocab)
    28 from waeup.sirp.students.interfaces import (IStudent, ICourseTicket,
     28from waeup.kofa.students.interfaces import (IStudent, ICourseTicket,
    2929    IStudentOnlinePayment)
    30 from waeup.sirp.university.vocabularies import course_levels
     30from waeup.kofa.university.vocabularies import course_levels
    3131
    3232class StudentIndexes(grok.Indexes):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/container.py

    r7652 r7811  
    2020"""
    2121import grok
    22 from waeup.sirp.students.interfaces import (
     22from waeup.kofa.students.interfaces import (
    2323    IStudentsContainer, IStudent)
    24 from waeup.sirp.utils.logger import Logger
     24from waeup.kofa.utils.logger import Logger
    2525
    2626class StudentsContainer(grok.Container, Logger):
     
    4646        return
    4747
    48     logger_name = 'waeup.sirp.${sitename}.students'
     48    logger_name = 'waeup.kofa.${sitename}.students'
    4949    logger_filename = 'students.log'
    5050
  • main/waeup.kofa/trunk/src/waeup/kofa/students/dynamicroles.py

    r7336 r7811  
    2727    AnnotationPrincipalPermissionManager,)
    2828from zope.securitypolicy.principalrole import AnnotationPrincipalRoleManager
    29 from waeup.sirp.students.interfaces import IStudent
     29from waeup.kofa.students.interfaces import IStudent
    3030
    3131# All components in here have the same context: Student instances
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r7723 r7811  
    2121from zope import schema
    2222from zc.sourcefactory.contextual import BasicContextualSourceFactory
    23 from waeup.sirp.interfaces import (
    24     ISIRPObject, academic_sessions_vocab, validate_email, ISIRPUtils)
    25 from waeup.sirp.interfaces import MessageFactory as _
    26 from waeup.sirp.schema import TextLineChoice
    27 from waeup.sirp.university.vocabularies import CourseSource, StudyModeSource
    28 from waeup.sirp.students.vocabularies import (
     23from waeup.kofa.interfaces import (
     24    IKOFAObject, academic_sessions_vocab, validate_email, IKOFAUtils)
     25from waeup.kofa.interfaces import MessageFactory as _
     26from waeup.kofa.schema import TextLineChoice
     27from waeup.kofa.university.vocabularies import CourseSource, StudyModeSource
     28from waeup.kofa.students.vocabularies import (
    2929  CertificateSource, StudyLevelSource,
    3030  contextual_reg_num_source, contextual_mat_num_source,
    3131  GenderSource, nats_vocab,
    3232  )
    33 from waeup.sirp.payments.interfaces import IPaymentsContainer, IOnlinePayment
     33from waeup.kofa.payments.interfaces import IPaymentsContainer, IOnlinePayment
    3434
    3535# VerdictSource can't be placed into the vocabularies module because it
     
    7878        """
    7979
    80 class IStudentsContainer(ISIRPObject):
     80class IStudentsContainer(IKOFAObject):
    8181    """A students container contains university students.
    8282
     
    117117        """
    118118
    119 class IStudentNavigation(ISIRPObject):
     119class IStudentNavigation(IKOFAObject):
    120120    """Interface needed for student navigation.
    121121
     
    126126        """
    127127
    128 class IStudentBase(ISIRPObject):
     128class IStudentBase(IKOFAObject):
    129129    """Representation of student base data.
    130130
     
    206206        )
    207207
    208 class IStudentClearance(ISIRPObject):
     208class IStudentClearance(IKOFAObject):
    209209    """Representation of student clearance data.
    210210
     
    234234        )
    235235
    236 class IStudentPersonal(ISIRPObject):
     236class IStudentPersonal(IKOFAObject):
    237237    """Representation of student personal data.
    238238
     
    268268        )
    269269
    270 class IStudentStudyCourse(ISIRPObject):
     270class IStudentStudyCourse(IKOFAObject):
    271271    """A container for student study levels.
    272272
     
    326326        )
    327327
    328 class IStudentStudyLevel(ISIRPObject):
     328class IStudentStudyLevel(IKOFAObject):
    329329    """A container for course tickets.
    330330
     
    348348        )
    349349
    350 class ICourseTicket(ISIRPObject):
     350class ICourseTicket(IKOFAObject):
    351351    """A course ticket.
    352352
     
    406406        )
    407407
    408 class IStudentAccommodation(ISIRPObject):
     408class IStudentAccommodation(IKOFAObject):
    409409    """A container for student accommodation objects.
    410410
    411411    """
    412412
    413 class IBedTicket(ISIRPObject):
     413class IBedTicket(IKOFAObject):
    414414    """A ticket for accommodation booking.
    415415
     
    475475    'p_item'].order
    476476
    477 class IStudentChangePassword(ISIRPObject):
     477class IStudentChangePassword(IKOFAObject):
    478478    """Interface needed for change pasword page.
    479479
  • main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py

    r7599 r7811  
    2222from zope.component.interfaces import IFactory
    2323from zope.interface import implementedBy
    24 from waeup.sirp.students.interfaces import (
     24from waeup.kofa.students.interfaces import (
    2525    IStudentPaymentsContainer, IStudentNavigation, IStudentOnlinePayment)
    26 from waeup.sirp.payments import PaymentsContainer, OnlinePayment
    27 from waeup.sirp.utils.helpers import attrs_to_fields
     26from waeup.kofa.payments import PaymentsContainer, OnlinePayment
     27from waeup.kofa.utils.helpers import attrs_to_fields
    2828
    2929class StudentPaymentsContainer(PaymentsContainer):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/student.py

    r7677 r7811  
    2626from hurry.workflow.interfaces import IWorkflowState, IWorkflowInfo
    2727from zope.securitypolicy.interfaces import IPrincipalRoleManager
    28 from waeup.sirp.interfaces import (
     28from waeup.kofa.interfaces import (
    2929    IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler,
    30     ISIRPUtils, CLEARANCE, registration_states_vocab)
    31 from waeup.sirp.image import SIRPImageFile
    32 from waeup.sirp.imagestorage import DefaultFileStoreHandler
    33 from waeup.sirp.students.interfaces import IStudent, IStudentNavigation
    34 from waeup.sirp.students.studycourse import StudentStudyCourse
    35 from waeup.sirp.students.payments import StudentPaymentsContainer
    36 from waeup.sirp.students.accommodation import StudentAccommodation
    37 from waeup.sirp.utils.helpers import attrs_to_fields
    38 from waeup.sirp.students.utils import generate_student_id
     30    IKOFAUtils, CLEARANCE, registration_states_vocab)
     31from waeup.kofa.image import KOFAImageFile
     32from waeup.kofa.imagestorage import DefaultFileStoreHandler
     33from waeup.kofa.students.interfaces import IStudent, IStudentNavigation
     34from waeup.kofa.students.studycourse import StudentStudyCourse
     35from waeup.kofa.students.payments import StudentPaymentsContainer
     36from waeup.kofa.students.accommodation import StudentAccommodation
     37from waeup.kofa.utils.helpers import attrs_to_fields
     38from waeup.kofa.students.utils import generate_student_id
    3939
    4040class Student(grok.Container):
     
    6363    def display_fullname(self):
    6464        middlename = getattr(self, 'middlename', None)
    65         sirp_utils = getUtility(ISIRPUtils)
    66         return sirp_utils.fullname(self.firstname, self.lastname, middlename)
     65        kofa_utils = getUtility(IKOFAUtils)
     66        return kofa_utils.fullname(self.firstname, self.lastname, middlename)
    6767
    6868    @property
     
    204204
    205205    This chooser is registered as an adapter providing
    206     :class:`waeup.sirp.interfaces.IFileStoreNameChooser`.
     206    :class:`waeup.kofa.interfaces.IFileStoreNameChooser`.
    207207
    208208    File store name choosers like this one are only convenience
     
    211211    manually setting up filenames for students.
    212212
    213     .. seealso:: :mod:`waeup.sirp.imagestorage`
     213    .. seealso:: :mod:`waeup.kofa.imagestorage`
    214214
    215215    """
     
    284284            StudentFileStoreHandler, self).createFile(
    285285            store, root,  filename, file_id, file)
    286         return file, path, SIRPImageFile(
     286        return file, path, KOFAImageFile(
    287287            file_obj.filename, file_obj.data)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py

    r7665 r7811  
    2323from zope.component.interfaces import IFactory
    2424from zope.interface import implementedBy
    25 from waeup.sirp.students.interfaces import (
     25from waeup.kofa.students.interfaces import (
    2626    IStudentStudyCourse, IStudentNavigation, IStudentStudyLevel)
    27 from waeup.sirp.students.studylevel import CourseTicket
    28 from waeup.sirp.utils.helpers import attrs_to_fields
     27from waeup.kofa.students.studylevel import CourseTicket
     28from waeup.kofa.utils.helpers import attrs_to_fields
    2929
    3030class StudentStudyCourse(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py

    r7633 r7811  
    2222import grok
    2323from zope.component.interfaces import IFactory
    24 from waeup.sirp.students.interfaces import (
     24from waeup.kofa.students.interfaces import (
    2525    IStudentStudyLevel, IStudentNavigation, ICourseTicket)
    26 from waeup.sirp.utils.helpers import attrs_to_fields
    27 from waeup.sirp.students.vocabularies import StudyLevelSource
     26from waeup.kofa.utils.helpers import attrs_to_fields
     27from waeup.kofa.students.vocabularies import StudyLevelSource
    2828
    2929class StudentStudyLevel(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_authentication.py

    r7364 r7811  
    2626from zope.securitypolicy.role import Role
    2727from zope.securitypolicy.interfaces import IRole, Allow
    28 from waeup.sirp.authentication import get_principal_role_manager
    29 from waeup.sirp.interfaces import IAuthPluginUtility, IUserAccount
    30 from waeup.sirp.students.authentication import (
     28from waeup.kofa.authentication import get_principal_role_manager
     29from waeup.kofa.interfaces import IAuthPluginUtility, IUserAccount
     30from waeup.kofa.students.authentication import (
    3131    StudentsAuthenticatorSetup, StudentAccount)
    32 from waeup.sirp.students.tests.test_browser import StudentsFullSetup
    33 from waeup.sirp.testing import FunctionalLayer
     32from waeup.kofa.students.tests.test_browser import StudentsFullSetup
     33from waeup.kofa.testing import FunctionalLayer
    3434
    3535class StudentsAuthenticatorSetupTests(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r7665 r7811  
    2828from zope.interface.verify import verifyClass, verifyObject
    2929
    30 from waeup.sirp.app import University
    31 from waeup.sirp.university.faculty import Faculty
    32 from waeup.sirp.university.department import Department
    33 from waeup.sirp.students.batching import (
     30from waeup.kofa.app import University
     31from waeup.kofa.university.faculty import Faculty
     32from waeup.kofa.university.department import Department
     33from waeup.kofa.students.batching import (
    3434    StudentProcessor, StudentStudyCourseProcessor,
    3535    StudentStudyLevelProcessor, CourseTicketProcessor,
    3636    StudentOnlinePaymentProcessor)
    37 from waeup.sirp.students.student import Student
    38 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    39 from waeup.sirp.interfaces import IBatchProcessor
     37from waeup.kofa.students.student import Student
     38from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     39from waeup.kofa.interfaces import IBatchProcessor
    4040
    4141STUDENT_SAMPLE_DATA = open(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r7723 r7811  
    3333from zope.testbrowser.testing import Browser
    3434from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    35 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    36 from waeup.sirp.app import University
    37 from waeup.sirp.configuration import SessionConfiguration
    38 from waeup.sirp.students.student import Student
    39 from waeup.sirp.students.studylevel import StudentStudyLevel
    40 from waeup.sirp.university.faculty import Faculty
    41 from waeup.sirp.university.department import Department
    42 from waeup.sirp.interfaces import IUserAccount
    43 from waeup.sirp.authentication import LocalRoleSetEvent
    44 from waeup.sirp.hostels.hostel import Hostel, Bed, NOT_OCCUPIED
     35from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     36from waeup.kofa.app import University
     37from waeup.kofa.configuration import SessionConfiguration
     38from waeup.kofa.students.student import Student
     39from waeup.kofa.students.studylevel import StudentStudyLevel
     40from waeup.kofa.university.faculty import Faculty
     41from waeup.kofa.university.department import Department
     42from waeup.kofa.interfaces import IUserAccount
     43from waeup.kofa.authentication import LocalRoleSetEvent
     44from waeup.kofa.hostels.hostel import Hostel, Bed, NOT_OCCUPIED
    4545
    4646PH_LEN = 2059  # Length of placeholder file
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_catalog.py

    r7640 r7811  
    2323from zope.component import queryUtility, createObject
    2424from zope.component.hooks import setSite
    25 from waeup.sirp.app import University
    26 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    27 from waeup.sirp.students.student import Student
    28 from waeup.sirp.students.studylevel import StudentStudyLevel, CourseTicket
    29 from waeup.sirp.university.faculty import Faculty
    30 from waeup.sirp.university.department import Department
     25from waeup.kofa.app import University
     26from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     27from waeup.kofa.students.student import Student
     28from waeup.kofa.students.studylevel import StudentStudyLevel, CourseTicket
     29from waeup.kofa.university.faculty import Faculty
     30from waeup.kofa.university.department import Department
    3131
    3232class CatalogTestSetup(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_container.py

    r7256 r7811  
    2323from zope.interface.verify import verifyClass, verifyObject
    2424from zope.component.hooks import setSite, clearSite
    25 from waeup.sirp.app import University
    26 from waeup.sirp.university.department import Department
    27 from waeup.sirp.students.interfaces import (
     25from waeup.kofa.app import University
     26from waeup.kofa.university.department import Department
     27from waeup.kofa.students.interfaces import (
    2828    IStudentsContainer,
    2929    )
    30 from waeup.sirp.students.container import (
     30from waeup.kofa.students.container import (
    3131    StudentsContainer,
    3232    )
    33 from waeup.sirp.testing import (
     33from waeup.kofa.testing import (
    3434    FunctionalLayer, FunctionalTestCase, remove_logger)
    3535
     
    3939
    4040    def setUp(self):
    41         remove_logger('waeup.sirp.app.students')
     41        remove_logger('waeup.kofa.app.students')
    4242        super(StudentsContainerTestCase, self).setUp()
    4343        # Setup a sample site for each test
     
    8686        logger = self.app['students'].logger
    8787        assert logger is not None
    88         assert logger.name == 'waeup.sirp.app.students'
     88        assert logger.name == 'waeup.kofa.app.students'
    8989        handlers = logger.handlers
    9090        assert len(handlers) == 1
     
    100100        logger = self.app['students'].logger
    101101        assert logger is not None
    102         assert logger.name == 'waeup.sirp.app.students'
     102        assert logger.name == 'waeup.kofa.app.students'
    103103        handlers = logger.handlers
    104104        assert len(handlers) == 1
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_dynamicroles.py

    r7257 r7811  
    2424from zope.securitypolicy.tests.test_annotationprincipalrolemanager import (
    2525    Test as APRMTest, Manageable)
    26 from waeup.sirp.testing import FunctionalLayer
    27 from waeup.sirp.students.tests.test_browser import StudentsFullSetup
    28 from waeup.sirp.students import Student, StudentPrincipalRoleManager
     26from waeup.kofa.testing import FunctionalLayer
     27from waeup.kofa.students.tests.test_browser import StudentsFullSetup
     28from waeup.kofa.students import Student, StudentPrincipalRoleManager
    2929
    3030class StudentPrincipalRoleManagerTests(APRMTest):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_payment.py

    r7193 r7811  
    2020"""
    2121
    22 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    23 from waeup.sirp.students.payments import (
     22from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     23from waeup.kofa.students.payments import (
    2424    StudentOnlinePayment, StudentOnlinePaymentFactory)
    25 from waeup.sirp.payments.interfaces import IOnlinePayment
    26 from waeup.sirp.students.interfaces import IStudentNavigation
     25from waeup.kofa.payments.interfaces import IOnlinePayment
     26from waeup.kofa.students.interfaces import IStudentNavigation
    2727
    2828class StudentOnlinePaymentFactoryTest(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py

    r7364 r7811  
    2020from zope.component.interfaces import IFactory
    2121from zope.interface import verify
    22 from waeup.sirp.students.student import Student, StudentFactory
    23 from waeup.sirp.students.studycourse import StudentStudyCourse
    24 from waeup.sirp.students.studylevel import StudentStudyLevel, CourseTicket
    25 from waeup.sirp.students.payments import StudentPaymentsContainer
    26 from waeup.sirp.students.accommodation import StudentAccommodation, BedTicket
    27 from waeup.sirp.applicants.interfaces import IApplicantBaseData
    28 from waeup.sirp.students.interfaces import (
     22from waeup.kofa.students.student import Student, StudentFactory
     23from waeup.kofa.students.studycourse import StudentStudyCourse
     24from waeup.kofa.students.studylevel import StudentStudyLevel, CourseTicket
     25from waeup.kofa.students.payments import StudentPaymentsContainer
     26from waeup.kofa.students.accommodation import StudentAccommodation, BedTicket
     27from waeup.kofa.applicants.interfaces import IApplicantBaseData
     28from waeup.kofa.students.interfaces import (
    2929    IStudent, IStudentStudyCourse, IStudentPaymentsContainer, IStudentAccommodation,
    3030    IStudentStudyLevel, ICourseTicket, IBedTicket)
    31 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    32 from waeup.sirp.university.department import Department
     31from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     32from waeup.kofa.university.department import Department
    3333
    3434class StudentTest(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_utils.py

    r7510 r7811  
    11# -*- coding: utf-8 -*-
    22import unittest
    3 from waeup.sirp.students.utils import formatted_text
     3from waeup.kofa.students.utils import formatted_text
    44
    55class FormatterTests(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_vocabularies.py

    r7691 r7811  
    1717##
    1818import unittest
    19 from waeup.sirp.students.vocabularies import StudyLevelSource
    20 from waeup.sirp.university.certificate import Certificate
     19from waeup.kofa.students.vocabularies import StudyLevelSource
     20from waeup.kofa.university.certificate import Certificate
    2121
    2222
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r7804 r7811  
    3535from zope.component import getUtility
    3636from zope.formlib.form import setUpEditWidgets
    37 from waeup.sirp.interfaces import IExtFileStore, ISIRPUtils
    38 from waeup.sirp.interfaces import MessageFactory as _
    39 from waeup.sirp.students.interfaces import IStudentsUtils
     37from waeup.kofa.interfaces import IExtFileStore, IKOFAUtils
     38from waeup.kofa.interfaces import MessageFactory as _
     39from waeup.kofa.students.interfaces import IStudentsUtils
    4040
    4141SLIP_STYLE = [
     
    108108        studentview.context, attr='passport.jpg')
    109109    if img is None:
    110         from waeup.sirp.browser import DEFAULT_PASSPORT_IMAGE_PATH
     110        from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH
    111111        img = open(DEFAULT_PASSPORT_IMAGE_PATH, 'rb')
    112112    doc_img = Image(img.name, width=4*cm, height=4*cm, kind='bound')
    113113    data_left.append([doc_img])
    114114    #data.append([Spacer(1, 12)])
    115     portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     115    portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    116116    for widget in studentview.widgets:
    117117        if widget.name == 'form.adm_code':
    118118            continue
    119119        f_label = formatted_label(size=12) % translate(
    120             widget.label.strip(), 'waeup.sirp',
     120            widget.label.strip(), 'waeup.kofa',
    121121            target_language=portal_language)
    122122        f_label = Paragraph(f_label, style["Normal"])
     
    164164      story = []
    165165      frame_footer = Frame(1*cm,0,width-(2*cm),1*cm)
    166       portal_language = getUtility(ISIRPUtils).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}),
    169           'waeup.sirp', target_language=portal_language)
     169          'waeup.kofa', target_language=portal_language)
    170170      story.append(Paragraph(right_text, style["Right"]))
    171171      frame_footer.addFromList(story,pdf)
     
    256256        pdf.setAuthor('%s (%s)' % (view.request.principal.title,
    257257            view.request.principal.id))
    258         pdf.setCreator('WAeUP SIRP')
     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(ISIRPUtils).PORTAL_LANGUAGE
     277        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    278278        if student is not None:
    279279            #story.append(Spacer(1, 12))
    280280            bd_translation = translate(_('Base Data'),
    281                 'waeup.sirp', target_language=portal_language)
     281                'waeup.kofa', target_language=portal_language)
    282282            story.append(Paragraph(bd_translation, style["Heading3"]))
    283283            studenttable = render_student_data(studentview)
     
    288288        set_up_widgets(view)
    289289        data = []
    290         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     290        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    291291        for widget in view.widgets:
    292292            f_label = '<font size=12>%s</font>:' % translate(
    293                 widget.label.strip(), 'waeup.sirp',
     293                widget.label.strip(), 'waeup.kofa',
    294294                target_language=portal_language)
    295295            f_label = Paragraph(f_label, style["Normal"])
     
    302302        # Import browser components locally
    303303        # to avoid circular import
    304         from waeup.sirp.students.viewlets import FileManager
    305         from waeup.sirp.browser import DEFAULT_IMAGE_PATH
     304        from waeup.kofa.students.viewlets import FileManager
     305        from waeup.kofa.browser import DEFAULT_IMAGE_PATH
    306306        data = []
    307307        # Collect viewlets
     
    309309        fm.update()
    310310        if fm.viewlets:
    311             sc_translation = translate(_('Scanned Documents'), 'waeup.sirp',
     311            sc_translation = translate(_('Scanned Documents'), 'waeup.kofa',
    312312                target_language=portal_language)
    313313            story.append(Paragraph(sc_translation, style["Heading3"]))
     
    315315            for viewlet in fm.viewlets:
    316316                f_label = formatted_label(size=12) % translate(
    317                 viewlet.label, 'waeup.sirp',
     317                viewlet.label, 'waeup.kofa',
    318318                target_language=portal_language)
    319319                f_label = Paragraph(f_label, style["Normal"])
  • main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py

    r7741 r7811  
    2121from zope.interface import Interface
    2222from zope.i18n import translate
    23 from waeup.sirp.interfaces import (
    24     ISIRPObject, IExtFileStore, IFileStoreNameChooser, ISIRPUtils)
    25 from waeup.sirp.interfaces import MessageFactory as _
    26 from waeup.sirp.utils.helpers import string_from_bytes, file_size
    27 from waeup.sirp.browser import DEFAULT_IMAGE_PATH
    28 from waeup.sirp.browser.viewlets import (
     23from waeup.kofa.interfaces import (
     24    IKOFAObject, IExtFileStore, IFileStoreNameChooser, IKOFAUtils)
     25from waeup.kofa.interfaces import MessageFactory as _
     26from waeup.kofa.utils.helpers import string_from_bytes, file_size
     27from waeup.kofa.browser import DEFAULT_IMAGE_PATH
     28from waeup.kofa.browser.viewlets import (
    2929    PrimaryNavTab, ManageActionButton, AddActionButton)
    30 from waeup.sirp.browser.layout import default_primary_nav_template
    31 from waeup.sirp.students.workflow import (ADMITTED, PAID,
     30from waeup.kofa.browser.layout import default_primary_nav_template
     31from waeup.kofa.students.workflow import (ADMITTED, PAID,
    3232    CLEARANCE, REQUESTED, RETURNING, CLEARED, REGISTERED, VALIDATED)
    33 from waeup.sirp.students.browser import (
     33from waeup.kofa.students.browser import (
    3434    StudentClearanceManageFormPage,
    3535    write_log_message, StudentBaseManageFormPage,
     
    4040    CourseTicketDisplayFormPage, OnlinePaymentDisplayFormPage,
    4141    AccommodationManageFormPage, BedTicketDisplayFormPage,)
    42 from waeup.sirp.students.interfaces import (
     42from waeup.kofa.students.interfaces import (
    4343    IStudentsContainer, IStudent, IStudentClearance,
    4444    IStudentStudyCourse, IStudentAccommodation, IStudentStudyLevel,
     
    4646    )
    4747
    48 from waeup.sirp.interfaces import MessageFactory as _
    49 
    50 grok.context(ISIRPObject) # Make ISIRPObject the default context
     48from waeup.kofa.interfaces import MessageFactory as _
     49
     50grok.context(IKOFAObject) # Make IKOFAObject the default context
    5151grok.templatedir('browser_templates')
    5252
     
    6363    grok.baseclass()
    6464    grok.viewletmanager(StudentManageSidebar)
    65     grok.context(ISIRPObject)
     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(ISIRPUtils).PORTAL_LANGUAGE
    76         lang = self.request.cookies.get('sirp.language', portal_language)
    77         text = translate(self.text, 'waeup.sirp',
     75        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     76        lang = self.request.cookies.get('kofa.language', portal_language)
     77        text = translate(self.text, 'waeup.kofa',
    7878            target_language=lang)
    7979        return u'<li><a href="%s">%s</a></li>' % (
     
    465465    """
    466466
    467     grok.context(ISIRPObject)
     467    grok.context(IKOFAObject)
    468468    grok.order(4)
    469469    grok.require('waeup.viewStudentsTab')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/vocabularies.py

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

    r7690 r7811  
    55from hurry.workflow.workflow import Transition, WorkflowState, NullCondition
    66from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
    7 from waeup.sirp.interfaces import (
    8     IObjectHistory, ISIRPWorkflowInfo, ISIRPUtils,
     7from waeup.kofa.interfaces import (
     8    IObjectHistory, IKOFAWorkflowInfo, IKOFAUtils,
    99    CREATED, ADMITTED, CLEARANCE, REQUESTED, CLEARED, PAID, RETURNING,
    1010    REGISTERED, VALIDATED)
    11 from waeup.sirp.interfaces import MessageFactory as _
    12 from waeup.sirp.workflow import SIRPWorkflow, SIRPWorkflowInfo
    13 from waeup.sirp.students.interfaces import IStudent, IStudentsUtils
     11from waeup.kofa.interfaces import MessageFactory as _
     12from waeup.kofa.workflow import KOFAWorkflow, KOFAWorkflowInfo
     13from waeup.kofa.students.interfaces import IStudent, IStudentsUtils
    1414
    1515
     
    156156UNLOCK_CLEARANCE_TRANS = ('reset3', 'reset4', 'start_clearance')
    157157
    158 registration_workflow = SIRPWorkflow(REGISTRATION_TRANSITIONS)
     158registration_workflow = KOFAWorkflow(REGISTRATION_TRANSITIONS)
    159159
    160160class RegistrationWorkflowState(WorkflowState, grok.Adapter):
     
    167167    state_id = 'wf.registration.id'
    168168
    169 class RegistrationWorkflowInfo(SIRPWorkflowInfo, 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(ISIRPWorkflowInfo)
     173    grok.provides(IKOFAWorkflowInfo)
    174174
    175175    def __init__(self, context):
  • main/waeup.kofa/trunk/src/waeup/kofa/testing.py

    r7581 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Testing support for :mod:`waeup.sirp`.
     18"""Testing support for :mod:`waeup.kofa`.
    1919"""
    2020import grok
     
    2828import warnings
    2929import zope.component
    30 import waeup.sirp
     30import waeup.kofa
    3131from zope.app.testing.functional import (
    3232    ZCMLLayer, FunctionalTestSetup, getRootFolder, sync, FunctionalTestCase)
     
    3737
    3838ftesting_zcml = os.path.join(
    39     os.path.dirname(waeup.sirp.__file__), 'ftesting.zcml')
     39    os.path.dirname(waeup.kofa.__file__), 'ftesting.zcml')
    4040FunctionalLayer = ZCMLLayer(ftesting_zcml, __name__, 'FunctionalLayer',
    4141                            allow_teardown=True)
     
    4545    """
    4646    result = logging.root.manager.loggerDict.keys()
    47     ws_loggers = [x for x in result if 'waeup.sirp' in x]
     47    ws_loggers = [x for x in result if 'waeup.kofa' in x]
    4848    if ws_loggers:
    4949        # For debugging: show any remaining loggers from w.s. namespace
     
    9393
    9494def maybe_grok():
    95     """Try to grok the :mod:`waeup.sirp` package.
     95    """Try to grok the :mod:`waeup.kofa` package.
    9696
    9797    For many tests, even simple ones, we want the components defined
    98     somewhere in the :mod:`waeup.sirp` package being registered. While
     98    somewhere in the :mod:`waeup.kofa` package being registered. While
    9999    grokking the complete package can become expensive when done many
    100100    times, we only want to grok if it did not happen
     
    105105    registered and does nothing in that case.
    106106
    107     The grokking of :mod:`waeup.sirp` is done with warnings disabled.
     107    The grokking of :mod:`waeup.kofa` is done with warnings disabled.
    108108
    109109    Returns ``True`` if grokking was done, ``False`` else.
     
    122122
    123123      import unittest2 as unittest # Want Python 2.7 features
    124       from waeup.sirp.testing import (
     124      from waeup.kofa.testing import (
    125125        maybe_grok, setUpZope, cleanUpZope,
    126126        )
    127       from waeup.sirp.app import University
     127      from waeup.kofa.app import University
    128128
    129129      class MyTestCase(unittest.TestCase):
     
    153153    Here the component registration is done only once for the whole
    154154    :class:`unittest.TestCase` and no ZODB is needed. That means
    155     inside the tests you can expect to have all :mod:`waeup.sirp`
     155    inside the tests you can expect to have all :mod:`waeup.kofa`
    156156    components (utilities, adapter, events) registered but as objects
    157157    have here still have no place inside a ZODB things like 'browsing'
     
    163163         If you use the Zope testrunner (from :mod:`zope.testing`)
    164164         then you have to use appropriate layers like the
    165          :class:`waeup.sirp.testing.SIRPUnitTestLayer`.
     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.sirp.testing.SIRPUnitTestLayer`
     174    .. seealso:: :class:`waeup.kofa.testing.KOFAUnitTestLayer`
    175175
    176176    """
    177177    gsm =  getGlobalSiteManager()
    178178    # If there are any event handlers registered already, we assume
    179     # that waeup.sirp was grokked already. There might be a batter
     179    # that waeup.kofa was grokked already. There might be a batter
    180180    # check, though.
    181181    if len(list(gsm.registeredHandlers())) > 0:
     
    184184    addCheckerPublic()
    185185    warnings.simplefilter('ignore') # disable (erraneous) warnings
    186     grok.testing.grok('waeup.sirp')
     186    grok.testing.grok('waeup.kofa')
    187187    warnings.simplefilter('default') # reenable warnings
    188188    return True
     
    191191    """Register a datacenter config utility for non-functional tests.
    192192    """
    193     from waeup.sirp.interfaces import IDataCenterConfig
     193    from waeup.kofa.interfaces import IDataCenterConfig
    194194    conf = queryUtility(IDataCenterConfig)
    195195    if conf is not None:
     
    204204    """Unregister a datacenter config utility for non-functional tests.
    205205    """
    206     from waeup.sirp.interfaces import IDataCenterConfig
     206    from waeup.kofa.interfaces import IDataCenterConfig
    207207    conf = queryUtility(IDataCenterConfig)
    208208    if conf is None:
     
    214214    return
    215215
    216 class SIRPUnitTestLayer(object):
    217     """A layer for tests that groks `waeup.sirp`.
    218 
    219     A Zope test layer that registers all :mod:`waeup.sirp` components
     216class KOFAUnitTestLayer(object):
     217    """A layer for tests that groks `waeup.kofa`.
     218
     219    A Zope test layer that registers all :mod:`waeup.kofa` components
    220220    before attached tests are run and cleans this registrations up
    221     afterwards. Also basic (non-waeup.sirp) components like the event
     221    afterwards. Also basic (non-waeup.kofa) components like the event
    222222    dispatcher machinery are registered, set up and cleaned up.
    223223
     
    237237
    238238      import unittest
    239       from waeup.sirp.testing import SIRPUnitTestLayer
     239      from waeup.kofa.testing import KOFAUnitTestLayer
    240240
    241241      class MyTestCase(unittest.TestCase):
    242242
    243           layer = SIRPUnitTestLayer
     243          layer = KOFAUnitTestLayer
    244244
    245245          # per-test setups and real tests go here...
     
    331331def clear_logger_collector():
    332332    from zope.component import queryUtility, getGlobalSiteManager
    333     from waeup.sirp.interfaces import ILoggerCollector
     333    from waeup.kofa.interfaces import ILoggerCollector
    334334    collector = queryUtility(ILoggerCollector)
    335335    if collector is None:
     
    363363        If no special `checker` is passed, we use an extended
    364364        :class:`doctest.OutputChecker` as defined in
    365         :mod:`waeup.sirp.testing`.
     365        :mod:`waeup.kofa.testing`.
    366366
    367367        If optional `optionflags` are not given, use ``REPORT_NDIFF``,
    368368        ``ELLIPSIS``, and ``NORMALIZE_WHITESPACE``.
    369369
    370         .. seealso:: :data:`waeup.sirp.testing.optionflags`
    371 
    372         .. seealso:: :data:`waeup.sirp.testing.checker`
     370        .. seealso:: :data:`waeup.kofa.testing.optionflags`
     371
     372        .. seealso:: :data:`waeup.kofa.testing.checker`
    373373        """
    374374        if checker.check_output(want, got, optionflags):
     
    406406    instance by something like:
    407407
    408       from waeup.sirp.testing import get_doctest_suite
     408      from waeup.kofa.testing import get_doctest_suite
    409409      def test_suite():
    410410        suite = get_doctest_suite(['mypkg/foo.txt', 'mypkg/bar.txt'])
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_app.py

    r7193 r7811  
    2222from zope.component.hooks import setSite
    2323from zope.interface.verify import verifyClass, verifyObject
    24 from waeup.sirp.app import University
    25 from waeup.sirp.interfaces import IUniversity
    26 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
     24from waeup.kofa.app import University
     25from waeup.kofa.interfaces import IUniversity
     26from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
    2727
    2828class UniversityTests(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_authentication.py

    r7290 r7811  
    2222from zope.pluggableauth.interfaces import IAuthenticatorPlugin
    2323from zope.securitypolicy.interfaces import IPrincipalRoleManager
    24 from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
    25 from waeup.sirp.authentication import (
    26     UserAuthenticatorPlugin, Account, SIRPPrincipalInfo,
     24from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
     25from waeup.kofa.authentication import (
     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, SIRPPrincipalInfo))
     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, SIRPPrincipalInfo))
     75        self.assertTrue(isinstance(result1, KOFAPrincipalInfo))
    7676        self.assertTrue(result2 is None)
    7777        return
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_configuration.py

    r7193 r7811  
    2020from zope.component.interfaces import IFactory
    2121from zope.interface import verify
    22 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    23 from waeup.sirp.configuration import (
     22from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     23from waeup.kofa.configuration import (
    2424    ConfigurationContainer, SessionConfiguration, SessionConfigurationFactory)
    25 from waeup.sirp.interfaces import(
     25from waeup.kofa.interfaces import(
    2626    IConfigurationContainer, ISessionConfiguration, ISessionConfigurationAdd)
    2727
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_doctests.py

    r7193 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Register doctests for waeup.sirp.
     18"""Register doctests for waeup.kofa.
    1919"""
    20 from waeup.sirp.testing import get_doctest_suite
     20from waeup.kofa.testing import get_doctest_suite
    2121
    2222def test_suite():
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_imagestorage.py

    r7193 r7811  
    2727from zope.component.hooks import setSite
    2828from zope.interface.verify import verifyClass, verifyObject
    29 from waeup.sirp.app import University
    30 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    31 from waeup.sirp.imagestorage import (
     29from waeup.kofa.app import University
     30from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     31from waeup.kofa.imagestorage import (
    3232    FileStoreNameChooser, ExtFileStore, DefaultFileStoreHandler,
    3333    DefaultStorage)
    34 from waeup.sirp.interfaces import (
     34from waeup.kofa.interfaces import (
    3535    IFileStoreNameChooser, IExtFileStore, IFileStoreHandler,)
    3636
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_interfaces.py

    r7321 r7811  
    2020import grok
    2121import unittest
    22 from waeup.sirp.interfaces import DuplicationError, RoleSource
    23 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
     22from waeup.kofa.interfaces import DuplicationError, RoleSource
     23from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
    2424
    2525class DuplicationErrorTests(unittest.TestCase):
     
    4848        # Register a role not visible to waeup portal as its name does
    4949        # not start with 'waeup.'
    50         class NonSIRPRole(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('NonSIRPRole', NonSIRPRole)
     55        grok.testing.grok_component('NonKOFARole', NonKOFARole)
    5656        return
    5757
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_objecthistory.py

    r7372 r7811  
    2525from zope.security.management import newInteraction, endInteraction
    2626from zope.security.testing import Principal, Participation
    27 from waeup.sirp.app import University
    28 from waeup.sirp.interfaces import IObjectHistory, ISIRPObject
    29 from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
    30 from waeup.sirp.objecthistory import ObjectHistory
     27from waeup.kofa.app import University
     28from waeup.kofa.interfaces import IObjectHistory, IKOFAObject
     29from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
     30from waeup.kofa.objecthistory import ObjectHistory
    3131
    3232class SampleObject(grok.Model):
    33     grok.implements(ISIRPObject)
     33    grok.implements(IKOFAObject)
    3434    pass
    3535
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_schoolgrades.py

    r7795 r7811  
    22import unittest
    33from zope.interface.verify import verifyObject, verifyClass
    4 from waeup.sirp.interfaces import IResultEntry, IResultEntryField
    5 from waeup.sirp.schoolgrades import ResultEntry, ResultEntryField
     4from waeup.kofa.interfaces import IResultEntry, IResultEntryField
     5from waeup.kofa.schoolgrades import ResultEntry, ResultEntryField
    66
    77class ResultEntryTests(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_smtp.py

    r7506 r7811  
    2727from zope.component.hooks import setSite
    2828from zope.sendmail.interfaces import IMailDelivery
    29 from waeup.sirp.app import University
    30 from waeup.sirp.interfaces import IMailService
    31 from waeup.sirp.smtp import (
     29from waeup.kofa.app import University
     30from waeup.kofa.interfaces import IMailService
     31from waeup.kofa.smtp import (
    3232    encode_header_item, encode_address, encode_body, FakeSMTPDelivery,
    3333    send_mail)
    34 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
     34from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
    3535
    3636#
     
    328328            'test program', 'no-reply@waeup.org',
    329329            'test mail receiver', EXTERNAL_MAIL_RECEIVER,
    330             'Test Mail from WAeUP SIRP',
     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 SIRP',
     347            'Test Mail from WAeUP KOFA',
    348348            'Hi from test mailer!\n\nRegards,\nTest Programme\n'
    349349            )
  • main/waeup.kofa/trunk/src/waeup/kofa/tests/test_waeup.py

    r7193 r7811  
    1717##
    1818"""
    19 Test setup for the waeup.sirp package.
     19Test setup for the waeup.kofa package.
    2020"""
    2121import grok
     
    2323import zope.component.eventtesting
    2424from zope.testing import renormalizing
    25 from waeup.sirp.testing import FunctionalLayer
     25from waeup.kofa.testing import FunctionalLayer
    2626
    2727def setUpZope(test):
     
    3232        ])
    3333
    34 # Register all tests in the waeup.sirp package
     34# Register all tests in the waeup.kofa package
    3535test_suite = grok.testing.register_all_tests(
    36     'waeup.sirp', checker=checker, usetup=setUpZope,
     36    'waeup.kofa', checker=checker, usetup=setUpZope,
    3737    layer=FunctionalLayer)
  • main/waeup.kofa/trunk/src/waeup/kofa/university/__init__.py

    r7681 r7811  
    11# Make this a package.
    2 from waeup.sirp.university.course import Course
    3 from waeup.sirp.university.coursescontainer import CoursesContainer
    4 from waeup.sirp.university.certificate import Certificate
    5 from waeup.sirp.university.certificatescontainer import CertificatesContainer
    6 from waeup.sirp.university.faculty import Faculty
    7 from waeup.sirp.university.department import Department
    8 from waeup.sirp.university.facultiescontainer import FacultiesContainer
     2from waeup.kofa.university.course import Course
     3from waeup.kofa.university.coursescontainer import CoursesContainer
     4from waeup.kofa.university.certificate import Certificate
     5from waeup.kofa.university.certificatescontainer import CertificatesContainer
     6from waeup.kofa.university.faculty import Faculty
     7from waeup.kofa.university.department import Department
     8from waeup.kofa.university.facultiescontainer import FacultiesContainer
    99__all__ = (
    1010    'Course', 'CoursesContainer',
  • main/waeup.kofa/trunk/src/waeup/kofa/university/api.txt

    r7333 r7811  
    1 :mod:`waeup.sirp.university` -- academic components
     1:mod:`waeup.kofa.university` -- academic components
    22***************************************************
    33
    4 .. module:: waeup.sirp.university
     4.. module:: waeup.kofa.university
    55
    66Components that represent academic 'core' stuff like faculties,
     
    99==========
    1010
    11 The :mod:`waeup.sirp.university` module provides the following submodules:
     11The :mod:`waeup.kofa.university` module provides the following submodules:
    1212
    1313.. toctree::
  • main/waeup.kofa/trunk/src/waeup/kofa/university/batching.py

    r7665 r7811  
    2626import grok
    2727from zope.interface import Interface
    28 from waeup.sirp.interfaces import IBatchProcessor
    29 from waeup.sirp.university.interfaces import (
     28from waeup.kofa.interfaces import IBatchProcessor
     29from waeup.kofa.university.interfaces import (
    3030    IFacultiesContainer, IFaculty, ICourse, IDepartment, ICertificate,
    3131    ICertificateCourse)
    32 from waeup.sirp.utils.batching import BatchProcessor
     32from waeup.kofa.utils.batching import BatchProcessor
    3333
    3434class FacultyProcessor(BatchProcessor):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/catalog.py

    r7641 r7811  
    2626from zope.index.text.parsetree import ParseError
    2727from zope.intid import IIntIds
    28 #from waeup.sirp.catalog import QueryResultItem
    29 from waeup.sirp.interfaces import IUniversity, IQueryResultItem
    30 from waeup.sirp.university.interfaces import (
     28#from waeup.kofa.catalog import QueryResultItem
     29from waeup.kofa.interfaces import IUniversity, IQueryResultItem
     30from waeup.kofa.university.interfaces import (
    3131    ICourse, ICertificateCourse, IDepartment,
    3232    ICertificate,
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py

    r7751 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """SIRP certificates
     18"""KOFA certificates
    1919"""
    2020import grok
     
    2424from zope.component.interfaces import IFactory, ComponentLookupError
    2525from zope.interface import implementedBy
    26 from waeup.sirp.university.interfaces import (
     26from waeup.kofa.university.interfaces import (
    2727    ICertificate, ICertificateAdd, ICertificateCourse)
    28 from waeup.sirp.university.vocabularies import course_levels
     28from waeup.kofa.university.vocabularies import course_levels
    2929
    3030class Certificate(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.txt

    r7665 r7811  
    1 :mod:`waeup.sirp.university.certificate` -- Certificates for SIRP
     1:mod:`waeup.kofa.university.certificate` -- Certificates for KOFA
    22******************************************************************
    33
    4 .. module:: waeup.sirp.university.certificate
     4.. module:: waeup.kofa.university.certificate
    55
    66Components that represent and manage certificates.
    77
    88.. :doctest:
    9 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111
     
    2525   All parameters are optional:
    2626
    27      >>> from waeup.sirp.university.certificate import Certificate
     27     >>> from waeup.kofa.university.certificate import Certificate
    2828     >>> mycertificate = Certificate()
    2929
    3030   Certificates have the attributes required by the `ICertificate` interface:
    3131
    32      >>> from waeup.sirp.university.interfaces import ICertificate
     32     >>> from waeup.kofa.university.interfaces import ICertificate
    3333     >>> ICertificate.providedBy(mycertificate)
    3434     True
     
    9999
    100100      Add a referrer of a course. A course is an object implementing
    101       :class:`waeup.sirp.interfaces.ICourse`.
     101      :class:`waeup.kofa.interfaces.ICourse`.
    102102
    103103      Please don't be confused by the term 'referrer'. As course objects
     
    159159     >>> mycertificate = createObject(u'waeup.Certificate')
    160160     >>> mycertificate
    161      <waeup.sirp.university.certificate.Certificate object at 0x...>
     161     <waeup.kofa.university.certificate.Certificate object at 0x...>
    162162
    163163   The factory complies with the specifications from the
     
    166166     >>> from zope.interface.verify import verifyClass
    167167     >>> from zope.component.interfaces import IFactory
    168      >>> from waeup.sirp.university.certificate import CertificateFactory
     168     >>> from waeup.kofa.university.certificate import CertificateFactory
    169169     >>> verifyClass(IFactory, CertificateFactory)
    170170     True
     
    175175     >>> certificate_factory = CertificateFactory()
    176176     >>> certificate_factory.getInterfaces()
    177      <implementedBy waeup.sirp.university.certificate.Certificate>
     177     <implementedBy waeup.kofa.university.certificate.Certificate>
    178178
    179179
     
    193193     >>> mycertificatecourse = createObject(u'waeup.CertificateCourse')
    194194     >>> mycertificatecourse
    195      <waeup.sirp.university.certificate.CertificateCourse object at 0x...>
     195     <waeup.kofa.university.certificate.CertificateCourse object at 0x...>
    196196
    197197   The factory complies with the specifications from the
     
    200200     >>> from zope.interface.verify import verifyClass
    201201     >>> from zope.component.interfaces import IFactory
    202      >>> from waeup.sirp.university.certificate import CertificateCourseFactory
     202     >>> from waeup.kofa.university.certificate import CertificateCourseFactory
    203203     >>> verifyClass(IFactory, CertificateCourseFactory)
    204204     True
     
    209209     >>> certcourse_factory = CertificateCourseFactory()
    210210     >>> certcourse_factory.getInterfaces()
    211      <implementedBy waeup.sirp.university.certificate.CertificateCourse>
     211     <implementedBy waeup.kofa.university.certificate.CertificateCourse>
    212212
    213213
     
    244244We can create certificates:
    245245
    246     >>> from waeup.sirp.university.certificate import Certificate
     246    >>> from waeup.kofa.university.certificate import Certificate
    247247    >>> mycertificate = Certificate()
    248248    >>> mycertificate
    249     <waeup.sirp.university.certificate.Certificate object at 0x...>
     249    <waeup.kofa.university.certificate.Certificate object at 0x...>
    250250
    251251Another way to create certificates is by asking for a factory called
     
    256256    >>> mycertificate = createObject(u'waeup.Certificate')
    257257    >>> mycertificate
    258     <waeup.sirp.university.certificate.Certificate object at 0x...>
     258    <waeup.kofa.university.certificate.Certificate object at 0x...>
    259259
    260260CertificateCourses
     
    264264:class:`ICertificateCourse` interface:
    265265
    266     >>> from waeup.sirp.university.interfaces import ICertificateCourse
    267     >>> from waeup.sirp.university.certificate import CertificateCourse
     266    >>> from waeup.kofa.university.interfaces import ICertificateCourse
     267    >>> from waeup.kofa.university.certificate import CertificateCourse
    268268    >>> mycertcourse = CertificateCourse(None, 200, False)
    269269    >>> ICertificateCourse.providedBy(mycertcourse)
     
    280280    >>> mycertcourse = createObject(u'waeup.CertificateCourse')
    281281    >>> mycertcourse
    282     <waeup.sirp.university.certificate.CertificateCourse object at 0x...>
     282    <waeup.kofa.university.certificate.CertificateCourse object at 0x...>
    283283
    284284.. _removecertificatecourses:
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificatescontainer.py

    r7333 r7811  
    2323from zope.component import queryUtility
    2424from zope.interface import implementedBy
    25 from waeup.sirp.interfaces import DuplicationError
    26 from waeup.sirp.university.interfaces import (
     25from waeup.kofa.interfaces import DuplicationError
     26from waeup.kofa.university.interfaces import (
    2727    ICertificatesContainer, ICertificate)
    2828
     
    3131
    3232    A :class:`CertificatesContainer` stores
    33     :class:`waeup.sirp.university.Certificate` instances.
     33    :class:`waeup.kofa.university.Certificate` instances.
    3434
    3535    It is a :class:`grok.Container` basically acting like a standard
     
    5252
    5353        The `certificate` must be an object implementing
    54         :class:`waeup.sirp.university.interfaces.ICertificate`. If
     54        :class:`waeup.kofa.university.interfaces.ICertificate`. If
    5555        not, a :exc:`TypeError` is raised.
    5656
     
    6060        If the `code` attribute of `certificate` is already in use by
    6161        another certificate stored in the local site
    62         (:class:`waeup.sirp.app.University` instance), then a
    63         :exc:`waeup.sirp.interfaces.DuplicationError` will be raised.
     62        (:class:`waeup.kofa.app.University` instance), then a
     63        :exc:`waeup.kofa.interfaces.DuplicationError` will be raised.
    6464
    6565        If `name` is already used as a key, a :exc:`KeyError` will be
     
    9292
    9393        The certificate must be an object implementing
    94         :class:`waeup.sirp.university.interfaces.ICertificate`. If
     94        :class:`waeup.kofa.university.interfaces.ICertificate`. If
    9595        not, a :exc:`TypeError` is raised.
    9696
     
    9898        `code` attribute as key. If this key is already used for
    9999        another certificate stored in the local site
    100         (:class:`waeup.sirp.app.University` instance), then a
    101         :exc:`waeup.sirp.interfaces.DuplicationError` will be raised.
     100        (:class:`waeup.kofa.app.University` instance), then a
     101        :exc:`waeup.kofa.interfaces.DuplicationError` will be raised.
    102102        """
    103103        self[getattr(certificate, 'code', None)] = certificate
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificatescontainer.txt

    r7333 r7811  
    1 :mod:`waeup.sirp.university.certificatescontainer` -- Certificate containers
     1:mod:`waeup.kofa.university.certificatescontainer` -- Certificate containers
    22****************************************************************************
    33
    4 .. module:: waeup.sirp.university.certificatescontainer
     4.. module:: waeup.kofa.university.certificatescontainer
    55
    66Containers for certificates.
    77
    88.. :doctest:
    9 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111
     
    2626   :class:`CertificatesContainer` instances are instances of
    2727   :class:`grok.Container` that hold and manage instances of
    28    :class:`waeup.sirp.university.certificate.Certificate`.
     28   :class:`waeup.kofa.university.certificate.Certificate`.
    2929
    30      >>> from waeup.sirp.university.certificatescontainer import CertificatesContainer
     30     >>> from waeup.kofa.university.certificatescontainer import CertificatesContainer
    3131     >>> mycontainer = CertificatesContainer()
    3232     >>> mycontainer
    33      <waeup.sirp.university.certificatescontainer.CertificatesContainer object at 0x...>
     33     <waeup.kofa.university.certificatescontainer.CertificatesContainer object at 0x...>
    3434
    3535   Certificate containers provide `ICertificatesContainer`:
    3636
    37      >>> from waeup.sirp.university.interfaces import ICertificatesContainer
     37     >>> from waeup.kofa.university.interfaces import ICertificatesContainer
    3838     >>> ICertificatesContainer.providedBy(mycontainer)
    3939     True
     
    5757
    5858      *certificate* must be an instance of
    59       :class:`waeup.sirp.university.certificate.Certificate`:
     59      :class:`waeup.kofa.university.certificate.Certificate`:
    6060
    61         >>> from waeup.sirp.university.certificatescontainer import (
     61        >>> from waeup.kofa.university.certificatescontainer import (
    6262        ...   CertificatesContainer)
    6363        >>> mycontainer = CertificatesContainer()
     
    6969      The key of added items is the ``code`` attribute:
    7070
    71         >>> from waeup.sirp.university.certificate import Certificate
     71        >>> from waeup.kofa.university.certificate import Certificate
    7272        >>> mycertificate = Certificate(code='CERTIFICATE1')
    7373        >>> mycontainer.addCertificate(mycertificate)
     
    104104     >>> mycertificatescontainer = createObject(u'waeup.CertificatesContainer')
    105105     >>> mycertificatescontainer
    106      <waeup.sirp.university.certificatescontainer.CertificatesContainer object at 0x...>
     106     <waeup.kofa.university.certificatescontainer.CertificatesContainer object at 0x...>
    107107
    108108   The factory complies with the specifications from the
     
    111111     >>> from zope.interface.verify import verifyClass
    112112     >>> from zope.component.interfaces import IFactory
    113      >>> from waeup.sirp.university.certificatescontainer import (
     113     >>> from waeup.kofa.university.certificatescontainer import (
    114114     ...   CertificatesContainerFactory)
    115115     >>> verifyClass(IFactory, CertificatesContainerFactory)
     
    121121     >>> certificatescontainer_factory = CertificatesContainerFactory()
    122122     >>> certificatescontainer_factory.getInterfaces()
    123      <implementedBy waeup.sirp.university.certificatescontainer.CertificatesContainer>
     123     <implementedBy waeup.kofa.university.certificatescontainer.CertificatesContainer>
    124124
    125125
     
    132132We can easily create `CertificatesContainers`:
    133133
    134     >>> from waeup.sirp.university.certificatescontainer import CertificatesContainer
     134    >>> from waeup.kofa.university.certificatescontainer import CertificatesContainer
    135135    >>> mycontainer = CertificatesContainer()
    136136
     
    143143    >>> from zope.component import createObject
    144144    >>> createObject(u'waeup.CertificatesContainer')
    145     <waeup.sirp.university.certificatescontainer.CertificatesContainer object at 0x...>
     145    <waeup.kofa.university.certificatescontainer.CertificatesContainer object at 0x...>
    146146
    147147This way we get a thing that implements ICertificatesContainer without
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.py

    r7333 r7811  
    2323from zope.component import getUtility
    2424from zope.component.interfaces import IFactory, ComponentLookupError
    25 from waeup.sirp.university.interfaces import ICourse, ICourseAdd
     25from waeup.kofa.university.interfaces import ICourse, ICourseAdd
    2626
    2727class Course(grok.Model):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.txt

    r7321 r7811  
    1 :mod:`waeup.sirp.university.course` -- Courses
     1:mod:`waeup.kofa.university.course` -- Courses
    22**********************************************
    33
    4 .. module:: waeup.sirp.university.course
     4.. module:: waeup.kofa.university.course
    55
    66Components that represent courses.
    77
    88.. :doctest:
    9 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111Content Classes (models and containers)
     
    2323   All parameters are optional:
    2424
    25      >>> from waeup.sirp.university.course import Course
     25     >>> from waeup.kofa.university.course import Course
    2626     >>> mycourse = Course()
    2727     >>> mycourse
    28      <waeup.sirp.university.course.Course object at 0x...>
     28     <waeup.kofa.university.course.Course object at 0x...>
    2929
    3030   Course instances have the attributes required by the
    31    :class:`waeup.sirp.interfaces.ICourse` interface:
     31   :class:`waeup.kofa.interfaces.ICourse` interface:
    3232
    33      >>> from waeup.sirp.university.interfaces import ICourse
     33     >>> from waeup.kofa.university.interfaces import ICourse
    3434     >>> ICourse.providedBy(mycourse)
    3535     True
     
    101101     >>> mycourse = createObject(u'waeup.Course')
    102102     >>> mycourse
    103      <waeup.sirp.university.course.Course object at 0x...>
     103     <waeup.kofa.university.course.Course object at 0x...>
    104104
    105105   The factory complies with the specifications from the
     
    108108     >>> from zope.interface.verify import verifyClass
    109109     >>> from zope.component.interfaces import IFactory
    110      >>> from waeup.sirp.university.course import CourseFactory
     110     >>> from waeup.kofa.university.course import CourseFactory
    111111     >>> verifyClass(IFactory, CourseFactory)
    112112     True
     
    117117     >>> course_factory = CourseFactory()
    118118     >>> course_factory.getInterfaces()
    119      <implementedBy waeup.sirp.university.course.Course>
     119     <implementedBy waeup.kofa.university.course.Course>
    120120
    121121Examples
     
    128128class and calling the constructor:
    129129
    130     >>> from waeup.sirp.university.course import Course
     130    >>> from waeup.kofa.university.course import Course
    131131    >>> mycourse = Course()
    132132    >>> mycourse
    133     <waeup.sirp.university.course.Course object at 0x...>
     133    <waeup.kofa.university.course.Course object at 0x...>
    134134
    135135Another way to create courses is by asking for a factory called
     
    140140    >>> mycourse = createObject(u'waeup.Course')
    141141    >>> mycourse
    142     <waeup.sirp.university.course.Course object at 0x...>
     142    <waeup.kofa.university.course.Course object at 0x...>
    143143
  • main/waeup.kofa/trunk/src/waeup/kofa/university/courserefs.txt

    r6737 r7811  
    1616As correct deletion of referrer needs support of catalogs (we lookup
    1717catalogs to find referrers), we need a fully blown ZODB here,
    18 including an instance of :class:`waeup.sirp.app.University`, as this is our
     18including an instance of :class:`waeup.kofa.app.University`, as this is our
    1919`ISite` object where the catalogs are stored.
    2020
     
    2323and course certificates:
    2424
    25     >>> from waeup.sirp.app import University
     25    >>> from waeup.kofa.app import University
    2626    >>> root = getRootFolder()
    2727    >>> root['app'] = University()
  • main/waeup.kofa/trunk/src/waeup/kofa/university/coursescontainer.py

    r7333 r7811  
    2323from zope.catalog.interfaces import ICatalog
    2424from zope.component import queryUtility
    25 from waeup.sirp.interfaces import DuplicationError
    26 from waeup.sirp.university.interfaces import ICoursesContainer, ICourse
     25from waeup.kofa.interfaces import DuplicationError
     26from waeup.kofa.university.interfaces import ICoursesContainer, ICourse
    2727
    2828class CoursesContainer(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/coursescontainer.txt

    r7333 r7811  
    1 :mod:`waeup.sirp.university.coursescontainer` -- Course containers
     1:mod:`waeup.kofa.university.coursescontainer` -- Course containers
    22******************************************************************
    33
    4 .. module:: waeup.sirp.university.coursescontainer
     4.. module:: waeup.kofa.university.coursescontainer
    55
    66Containers for courses.
    77
    88.. :doctest:
    9 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111
     
    2626   :class:`CoursesContainer` instances are instances of
    2727   :class:`grok.Container` that hold and manage instances of
    28    :class:`waeup.sirp.university.course.Course`.
     28   :class:`waeup.kofa.university.course.Course`.
    2929
    30      >>> from waeup.sirp.university.coursescontainer import CoursesContainer
     30     >>> from waeup.kofa.university.coursescontainer import CoursesContainer
    3131     >>> mycontainer = CoursesContainer()
    3232     >>> mycontainer
    33      <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
     33     <waeup.kofa.university.coursescontainer.CoursesContainer object at 0x...>
    3434
    3535   Course containers provide `ICoursesContainer`:
    3636
    37      >>> from waeup.sirp.university.interfaces import ICoursesContainer
     37     >>> from waeup.kofa.university.interfaces import ICoursesContainer
    3838     >>> ICoursesContainer.providedBy(mycontainer)
    3939     True
     
    5757
    5858      *course* must be an instance of
    59       :class:`waeup.sirp.university.course.Course`:
     59      :class:`waeup.kofa.university.course.Course`:
    6060
    61         >>> from waeup.sirp.university.coursescontainer import CoursesContainer
     61        >>> from waeup.kofa.university.coursescontainer import CoursesContainer
    6262        >>> mycontainer = CoursesContainer()
    6363        >>> mycontainer.addCourse('blah')
     
    6868      The key of added items is the ``code`` attribute:
    6969
    70         >>> from waeup.sirp.university.course import Course
     70        >>> from waeup.kofa.university.course import Course
    7171        >>> mycourse = Course(code='COURSE1')
    7272        >>> mycontainer.addCourse(mycourse)
     
    103103     >>> mycoursescontainer = createObject(u'waeup.CoursesContainer')
    104104     >>> mycoursescontainer
    105      <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
     105     <waeup.kofa.university.coursescontainer.CoursesContainer object at 0x...>
    106106
    107107   The factory complies with the specifications from the
     
    110110     >>> from zope.interface.verify import verifyClass
    111111     >>> from zope.component.interfaces import IFactory
    112      >>> from waeup.sirp.university.coursescontainer import CoursesContainerFactory
     112     >>> from waeup.kofa.university.coursescontainer import CoursesContainerFactory
    113113     >>> verifyClass(IFactory, CoursesContainerFactory)
    114114     True
     
    119119     >>> coursescontainer_factory = CoursesContainerFactory()
    120120     >>> coursescontainer_factory.getInterfaces()
    121      <implementedBy waeup.sirp.university.coursescontainer.CoursesContainer>
     121     <implementedBy waeup.kofa.university.coursescontainer.CoursesContainer>
    122122
    123123
     
    130130We can easily create `CoursesContainers`:
    131131
    132     >>> from waeup.sirp.university.coursescontainer import CoursesContainer
     132    >>> from waeup.kofa.university.coursescontainer import CoursesContainer
    133133    >>> mycontainer = CoursesContainer()
    134134
     
    141141    >>> from zope.component import createObject
    142142    >>> createObject(u'waeup.CoursesContainer')
    143     <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
     143    <waeup.kofa.university.coursescontainer.CoursesContainer object at 0x...>
    144144
    145145This way we get a thing that implements ICoursesContainer without
  • main/waeup.kofa/trunk/src/waeup/kofa/university/department.py

    r7733 r7811  
    2222from zope.interface import implementedBy
    2323from zope.component import getUtility
    24 from waeup.sirp.university.coursescontainer import CoursesContainer
    25 from waeup.sirp.university.certificatescontainer import CertificatesContainer
    26 from waeup.sirp.interfaces import ISIRPUtils
    27 from waeup.sirp.university.interfaces import IDepartment, IDepartmentAdd
     24from waeup.kofa.university.coursescontainer import CoursesContainer
     25from waeup.kofa.university.certificatescontainer import CertificatesContainer
     26from waeup.kofa.interfaces import IKOFAUtils
     27from waeup.kofa.university.interfaces import IDepartment, IDepartmentAdd
    2828
    2929class Department(grok.Container):
     
    7373
    7474    def longtitle(self):
    75         insttypes_dict = getUtility(ISIRPUtils).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

    r7333 r7811  
    1 :mod:`waeup.sirp.university.department` -- Departments
     1:mod:`waeup.kofa.university.department` -- Departments
    22******************************************************
    33
    4 .. module:: waeup.sirp.university.department
     4.. module:: waeup.kofa.university.department
    55
    66Components that represent university departments.
    77
    88.. :doctest:
    9 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111Content Classes (models and containers)
     
    2020   Create a representation of a university department:
    2121
    22      >>> from waeup.sirp.university.department import Department
     22     >>> from waeup.kofa.university.department import Department
    2323     >>> mydept = Department()
    2424     >>> mydept
    25      <waeup.sirp.university.department.Department object at 0x...>
     25     <waeup.kofa.university.department.Department object at 0x...>
    2626
    2727   Another way to create :class:`Department` instances is by asking
    28    for a factory called ``waeup.sirp.Department``. This way we can create a
     28   for a factory called ``waeup.kofa.Department``. This way we can create a
    2929   department without importing a class:
    3030
     
    3232     >>> mydept = createObject(u'waeup.Department')
    3333     >>> mydept
    34      <waeup.sirp.university.department.Department object at 0x...>
     34     <waeup.kofa.university.department.Department object at 0x...>
    3535
    3636   :class:`Department` instances have the attributes required by the
    3737   `IDepartment` interface:
    3838
    39      >>> from waeup.sirp.university.interfaces import IDepartment
     39     >>> from waeup.kofa.university.interfaces import IDepartment
    4040     >>> IDepartment.providedBy(mydept)
    4141     True
     
    8686
    8787        >>> mydept.courses
    88         <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
     88        <waeup.kofa.university.coursescontainer.CoursesContainer object at 0x...>
    8989
    9090
     
    9797
    9898        >>> mydept.certificates
    99         <waeup.sirp...certificatescontainer.CertificatesContainer object at 0x...>
     99        <waeup.kofa...certificatescontainer.CertificatesContainer object at 0x...>
    100100
    101101Utilities
     
    117117     >>> mydepartment = createObject(u'waeup.Department')
    118118     >>> mydepartment
    119      <waeup.sirp.university.department.Department object at 0x...>
     119     <waeup.kofa.university.department.Department object at 0x...>
    120120
    121121   The factory complies with the specifications from the
     
    124124     >>> from zope.interface.verify import verifyClass
    125125     >>> from zope.component.interfaces import IFactory
    126      >>> from waeup.sirp.university.department import DepartmentFactory
     126     >>> from waeup.kofa.university.department import DepartmentFactory
    127127     >>> verifyClass(IFactory, DepartmentFactory)
    128128     True
     
    133133     >>> department_factory = DepartmentFactory()
    134134     >>> department_factory.getInterfaces()
    135      <implementedBy waeup.sirp.university.department.Department>
     135     <implementedBy waeup.kofa.university.department.Department>
  • main/waeup.kofa/trunk/src/waeup/kofa/university/export.py

    r7757 r7811  
    2121import grok
    2222from cStringIO import StringIO
    23 from waeup.sirp.interfaces import ICSVExporter
     23from waeup.kofa.interfaces import ICSVExporter
    2424
    2525class FacultyExporter(grok.GlobalUtility):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/facultiescontainer.py

    r7725 r7811  
    1919from zope.component.interfaces import IFactory
    2020from zope.interface import implementedBy
    21 from waeup.sirp.interfaces import ISIRPPluggable
    22 from waeup.sirp.university.interfaces import IFacultiesContainer, IFaculty
     21from waeup.kofa.interfaces import IKOFAPluggable
     22from waeup.kofa.university.interfaces import IFacultiesContainer, IFaculty
    2323
    2424class FacultiesContainer(grok.Container):
     
    5252    """A plugin that creates container for faculties inside a university.
    5353    """
    54     grok.implements(ISIRPPluggable)
     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 SIRP.')
     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

    r7333 r7811  
    1 :mod:`waeup.sirp.university.facultiescontainer` -- Faculty Containers
     1:mod:`waeup.kofa.university.facultiescontainer` -- Faculty Containers
    22*********************************************************************
    33
    4 .. module:: waeup.sirp.university.facultiescontainer
     4.. module:: waeup.kofa.university.facultiescontainer
    55
    66Components that represent faculty containers.
    77
    88.. :doctest:
    9 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111
     
    2020   Create a faculty container:
    2121
    22      >>> from waeup.sirp.university.facultiescontainer import FacultiesContainer
     22     >>> from waeup.kofa.university.facultiescontainer import FacultiesContainer
    2323     >>> mycontainer = FacultiesContainer()
    2424     >>> mycontainer
    25      <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
     25     <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
    2626
    2727   Another way to create :class:`FacultiesContainer` instances is by asking
     
    3232     >>> mycontainer = createObject(u'waeup.FacultiesContainer')
    3333     >>> mycontainer
    34      <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
     34     <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
    3535
    3636   :class:`FacultiesContainer` instances have the attributes required by the
    3737   `IFacultiesContainer` interface:
    3838
    39      >>> from waeup.sirp.university.interfaces import IFacultiesContainer
     39     >>> from waeup.kofa.university.interfaces import IFacultiesContainer
    4040     >>> IFacultiesContainer.providedBy(mycontainer)
    4141     True
     
    6060      Regular faculties are accepted:
    6161
    62         >>> from waeup.sirp.university.faculty import Faculty
     62        >>> from waeup.kofa.university.faculty import Faculty
    6363        >>> mycontainer.addFaculty(Faculty(title='Physics',
    6464        ...                                code='FP'))
    6565
    6666        >>> list(mycontainer.items())
    67         [(u'FP', <waeup.sirp.university.faculty.Faculty object at 0x...>)]
     67        [(u'FP', <waeup.kofa.university.faculty.Faculty object at 0x...>)]
    6868
    6969
     
    7777.. class:: AcademicsPlugin()
    7878
    79    .. attribute:: grok.implements(ISIRPPluggable)
     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 SIRP
     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 SIRP apps.
     84   instances, which serve as root object for academics stuff in KOFA apps.
    8585
    8686
     
    100100     >>> mycontainer = createObject(u'waeup.FacultiesContainer')
    101101     >>> mycontainer
    102      <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
     102     <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
    103103
    104104   The factory complies with the specifications from the
     
    107107     >>> from zope.interface.verify import verifyClass
    108108     >>> from zope.component.interfaces import IFactory
    109      >>> from waeup.sirp.university.facultiescontainer import (
     109     >>> from waeup.kofa.university.facultiescontainer import (
    110110     ...   FacultiesContainerFactory)
    111111     >>> verifyClass(IFactory, FacultiesContainerFactory)
     
    117117     >>> fac_container_factory = FacultiesContainerFactory()
    118118     >>> fac_container_factory.getInterfaces()
    119      <implementedBy waeup.sirp.university.facultiescontainer.FacultiesContainer>
     119     <implementedBy waeup.kofa.university.facultiescontainer.FacultiesContainer>
    120120
    121121Examples
     
    124124We can easily create `FacultiesContainers`:
    125125
    126     >>> from waeup.sirp.university.facultiescontainer import FacultiesContainer
     126    >>> from waeup.kofa.university.facultiescontainer import FacultiesContainer
    127127    >>> mycontainer = FacultiesContainer()
    128128
    129129Faculty containers provide `IFacultiesContainer`:
    130130
    131     >>> from waeup.sirp.university.interfaces import IFacultiesContainer
     131    >>> from waeup.kofa.university.interfaces import IFacultiesContainer
    132132    >>> IFacultiesContainer.providedBy(mycontainer)
    133133    True
     
    139139    >>> from zope.component import createObject
    140140    >>> createObject(u'waeup.FacultiesContainer')
    141     <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
     141    <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...>
    142142
    143143This way we get a thing that implements IFacultiesContainer without
     
    165165Okay, so we have to get a faculty first::
    166166
    167     >>> from waeup.sirp.university.faculty import Faculty
     167    >>> from waeup.kofa.university.faculty import Faculty
    168168    >>> myfaculty = Faculty()
    169169
  • main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.py

    r7729 r7811  
    2323from zope.interface import implementedBy
    2424from zope.component import getUtility
    25 from waeup.sirp.interfaces import ISIRPUtils
    26 from waeup.sirp.university.interfaces import (
     25from waeup.kofa.interfaces import IKOFAUtils
     26from waeup.kofa.university.interfaces import (
    2727    IFaculty, IFacultyAdd, IDepartment)
    2828
     
    6161
    6262    def longtitle(self):
    63         insttypes_dict = getUtility(ISIRPUtils).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

    r7321 r7811  
    1 :mod:`waeup.sirp.university.faculty` -- Faculties
     1:mod:`waeup.kofa.university.faculty` -- Faculties
    22*************************************************
    33
    4 .. module:: waeup.sirp.university.faculty
     4.. module:: waeup.kofa.university.faculty
    55
    66Components that represent university faculties.
    77
    88.. :doctest:
    9 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     9.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    1010
    1111
     
    2121   Create a representation of a university faculty:
    2222
    23      >>> from waeup.sirp.university.faculty import Faculty
     23     >>> from waeup.kofa.university.faculty import Faculty
    2424     >>> myfac = Faculty()
    2525     >>> myfac
    26      <waeup.sirp.university.faculty.Faculty object at 0x...>
     26     <waeup.kofa.university.faculty.Faculty object at 0x...>
    2727
    2828   Another way to create :class:`Faculty` instances is by asking
     
    3333     >>> myfac = createObject(u'waeup.Faculty')
    3434     >>> myfac
    35      <waeup.sirp.university.faculty.Faculty object at 0x...>
     35     <waeup.kofa.university.faculty.Faculty object at 0x...>
    3636
    3737   :class:`Faculty` instances have the attributes required by the
    3838   `IFaculty` interface:
    3939
    40      >>> from waeup.sirp.university.interfaces import IFaculty
     40     >>> from waeup.kofa.university.interfaces import IFaculty
    4141     >>> IFaculty.providedBy(myfac)
    4242     True
     
    6262      Regular departments are accepted:
    6363
    64         >>> from waeup.sirp.university.department import Department
     64        >>> from waeup.kofa.university.department import Department
    6565        >>> myfac.addDepartment(Department(title='Physics',
    6666        ...                                code='DP'))
    6767
    6868        >>> list(myfac.items())
    69         [(u'DP', <waeup.sirp.university.department.Department object at 0x...>)]
     69        [(u'DP', <waeup.kofa.university.department.Department object at 0x...>)]
    7070
    7171
     
    121121     >>> myfaculty = createObject(u'waeup.Faculty')
    122122     >>> myfaculty
    123      <waeup.sirp.university.faculty.Faculty object at 0x...>
     123     <waeup.kofa.university.faculty.Faculty object at 0x...>
    124124
    125125   The factory complies with the specifications from the
     
    128128     >>> from zope.interface.verify import verifyClass
    129129     >>> from zope.component.interfaces import IFactory
    130      >>> from waeup.sirp.university.faculty import FacultyFactory
     130     >>> from waeup.kofa.university.faculty import FacultyFactory
    131131     >>> verifyClass(IFactory, FacultyFactory)
    132132     True
     
    137137     >>> faculty_factory = FacultyFactory()
    138138     >>> faculty_factory.getInterfaces()
    139      <implementedBy waeup.sirp.university.faculty.Faculty>
     139     <implementedBy waeup.kofa.university.faculty.Faculty>
    140140
    141141
     
    145145We can create faculties:
    146146
    147     >>> from waeup.sirp.university.faculty import Faculty
     147    >>> from waeup.kofa.university.faculty import Faculty
    148148    >>> myfaculty = Faculty()
    149149    >>> myfaculty
    150     <waeup.sirp.university.faculty.Faculty object at 0x...>
     150    <waeup.kofa.university.faculty.Faculty object at 0x...>
    151151
    152152Another way to create faculties is by asking for a factory called
     
    157157    >>> myfaculty = createObject(u'waeup.Faculty')
    158158    >>> myfaculty
    159     <waeup.sirp.university.faculty.Faculty object at 0x...>
     159    <waeup.kofa.university.faculty.Faculty object at 0x...>
    160160
    161161Faculty attributes
     
    164164Faculties have the attributes required by the `IFaculty` interface:
    165165
    166     >>> from waeup.sirp.university.interfaces import IFaculty
     166    >>> from waeup.kofa.university.interfaces import IFaculty
    167167    >>> IFaculty.providedBy(myfaculty)
    168168    True
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r7707 r7811  
    2121from zope import schema
    2222from zope.interface import Attribute
    23 from waeup.sirp.interfaces import (ISIRPObject, ISIRPContainer)
    24 from waeup.sirp.interfaces import MessageFactory as _
    25 from waeup.sirp.university.vocabularies import (
     23from waeup.kofa.interfaces import (IKOFAObject, IKOFAContainer)
     24from waeup.kofa.interfaces import MessageFactory as _
     25from waeup.kofa.university.vocabularies import (
    2626    course_levels,
    2727    CourseSource,
     
    3232    )
    3333
    34 class IFaculty(ISIRPContainer):
     34class IFaculty(IKOFAContainer):
    3535    """Representation of a university faculty.
    3636    """
     
    7373IFacultyAdd['code'].order =  IFaculty['code'].order
    7474
    75 class IFacultiesContainer(ISIRPContainer):
     75class IFacultiesContainer(IKOFAContainer):
    7676    """A container for faculties.
    7777    """
     
    8080
    8181        """
    82 class IDepartment(ISIRPObject):
     82class IDepartment(IKOFAObject):
    8383    """Representation of a department.
    8484    """
     
    124124IDepartmentAdd['code'].order =  IDepartment['code'].order
    125125
    126 class ICoursesContainer(ISIRPContainer):
     126class ICoursesContainer(IKOFAContainer):
    127127    """A container for faculties.
    128128    """
     
    133133        """
    134134
    135 class ICourse(ISIRPObject):
     135class ICourse(IKOFAObject):
    136136    """Representation of a course.
    137137    """
     
    186186ICourseAdd['code'].order =  ICourse['code'].order
    187187
    188 class ICertificate(ISIRPObject):
     188class ICertificate(IKOFAObject):
    189189    """Representation of a certificate.
    190190    """
     
    248248ICertificateAdd['code'].order =  ICertificate['code'].order
    249249
    250 class ICertificatesContainer(ISIRPContainer):
     250class ICertificatesContainer(IKOFAContainer):
    251251    """A container for certificates.
    252252    """
     
    257257        """
    258258
    259 class ICertificateCourse(ISIRPObject):
     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_batching.py

    r7195 r7811  
    2121
    2222from zope.interface.verify import verifyClass, verifyObject
    23 from waeup.sirp.interfaces import IBatchProcessor
    24 from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
    25 from waeup.sirp.university.batching import (
     23from waeup.kofa.interfaces import IBatchProcessor
     24from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
     25from waeup.kofa.university.batching import (
    2626    FacultyProcessor, DepartmentProcessor, CourseProcessor,
    2727    CertificateProcessor, CertificateCourseProcessor)
    28 from waeup.sirp.university.certificate import Certificate, CertificateCourse
    29 from waeup.sirp.university.course import Course
    30 from waeup.sirp.university.department import Department
     28from waeup.kofa.university.certificate import Certificate, CertificateCourse
     29from waeup.kofa.university.course import Course
     30from waeup.kofa.university.department import Department
    3131
    3232
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_certificatescontainer.py

    r7333 r7811  
    2525from zope.interface.verify import verifyClass, verifyObject
    2626
    27 from waeup.sirp.app import University
    28 from waeup.sirp.interfaces import DuplicationError
    29 from waeup.sirp.testing import (
     27from waeup.kofa.app import University
     28from waeup.kofa.interfaces import DuplicationError
     29from waeup.kofa.testing import (
    3030    FunctionalLayer, doctestsuite_for_module, FunctionalTestCase)
    31 from waeup.sirp.university.certificate import Certificate
    32 from waeup.sirp.university.certificatescontainer import CertificatesContainer
    33 from waeup.sirp.university.interfaces import ICertificatesContainer
     31from waeup.kofa.university.certificate import Certificate
     32from waeup.kofa.university.certificatescontainer import CertificatesContainer
     33from waeup.kofa.university.interfaces import ICertificatesContainer
    3434
    3535
     
    132132        unittest.makeSuite(CertificatesContainerTests),
    133133        doctestsuite_for_module(
    134                 'waeup.sirp.university.certificatescontainer'),
     134                'waeup.kofa.university.certificatescontainer'),
    135135        ))
    136136    return suite
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_coursescontainer.py

    r7333 r7811  
    2121import unittest
    2222from zope.interface.verify import verifyClass, verifyObject
    23 from waeup.sirp.university.interfaces import ICoursesContainer
    24 from waeup.sirp.university import CoursesContainer, Course
     23from waeup.kofa.university.interfaces import ICoursesContainer
     24from waeup.kofa.university import CoursesContainer, Course
    2525
    2626class CoursesContainerTests(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py

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

    r7333 r7811  
    2222from StringIO import StringIO
    2323from zope.interface.verify import verifyObject, verifyClass
    24 from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
    25 from waeup.sirp.university.interfaces import IFacultiesContainer
    26 from waeup.sirp.university import FacultiesContainer
    27 from waeup.sirp.university.facultiescontainer import AcademicsPlugin
     24from waeup.kofa.testing import FunctionalTestCase, FunctionalLayer
     25from waeup.kofa.university.interfaces import IFacultiesContainer
     26from waeup.kofa.university import FacultiesContainer
     27from waeup.kofa.university.facultiescontainer import AcademicsPlugin
    2828
    2929class FakeLogger(object):
     
    9090        self.assertEqual(
    9191            self._logger_factory.get_messages(),
    92             'Could not create container for faculties in SIRP.\n'
     92            'Could not create container for faculties in KOFA.\n'
    9393            )
    9494
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_faculty.py

    r7681 r7811  
    2222import unittest
    2323from zope.interface.verify import verifyObject, verifyClass
    24 from waeup.sirp.university import Faculty, Department
    25 from waeup.sirp.university.interfaces import IFaculty, IDepartment
     24from waeup.kofa.university import Faculty, Department
     25from waeup.kofa.university.interfaces import IFaculty, IDepartment
    2626
    2727class FacultyAndDepartmentTests(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_university.py

    r7333 r7811  
    1919# Test the public API part of the university subpackage
    2020import unittest
    21 from waeup.sirp.university import *
    22 from waeup.sirp.testing import get_doctest_suite
     21from waeup.kofa.university import *
     22from waeup.kofa.testing import get_doctest_suite
    2323
    2424class UniversitySubpackageTests(unittest.TestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/university/vocabularies.py

    r7688 r7811  
    2222from zope.catalog.interfaces import ICatalog
    2323from zope.component import getUtility
    24 from waeup.sirp.interfaces import SimpleSIRPVocabulary, ISIRPUtils
    25 from waeup.sirp.interfaces import MessageFactory as _
     24from waeup.kofa.interfaces import SimpleKOFAVocabulary, IKOFAUtils
     25from waeup.kofa.interfaces import MessageFactory as _
    2626
    27 course_levels = SimpleSIRPVocabulary(
     27course_levels = SimpleKOFAVocabulary(
    2828    (_('Pre-Studies'),10),
    2929    (_('100 (Year 1)'),100),
     
    4141    """
    4242    def getValues(self, context):
    43         semesters_dict = getUtility(ISIRPUtils).getSemesterDict()
     43        semesters_dict = getUtility(IKOFAUtils).getSemesterDict()
    4444        return semesters_dict.keys()
    4545
     
    4848
    4949    def getTitle(self, context, value):
    50         semesters_dict = getUtility(ISIRPUtils).getSemesterDict()
     50        semesters_dict = getUtility(IKOFAUtils).getSemesterDict()
    5151        return semesters_dict[value]
    5252
     
    5656    """
    5757    def getValues(self, context):
    58         insttypes_dict = getUtility(ISIRPUtils).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(ISIRPUtils).getInstTypeDict()
     65        insttypes_dict = getUtility(IKOFAUtils).getInstTypeDict()
    6666        return insttypes_dict[value]
    6767
     
    7171    """
    7272    def getValues(self, context):
    73         appcats_dict = getUtility(ISIRPUtils).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(ISIRPUtils).getAppCatDict()
     80        appcats_dict = getUtility(IKOFAUtils).getAppCatDict()
    8181        return appcats_dict[value]
    8282
     
    8686    """
    8787    def getValues(self, context):
    88         studymodes_dict = getUtility(ISIRPUtils).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(ISIRPUtils).getStudyModesDict()
     95        studymodes_dict = getUtility(IKOFAUtils).getStudyModesDict()
    9696        return studymodes_dict[value]
    9797
  • main/waeup.kofa/trunk/src/waeup/kofa/userscontainer.py

    r7653 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Users container for the SIRP portal.
     18"""Users container for the KOFA portal.
    1919"""
    2020import grok
    2121from zope.event import notify
    22 from waeup.sirp.authentication import Account
    23 from waeup.sirp.interfaces import IUsersContainer
    24 from waeup.sirp.utils.logger import Logger
     22from waeup.kofa.authentication import Account
     23from waeup.kofa.interfaces import IUsersContainer
     24from waeup.kofa.utils.logger import Logger
    2525
    2626class UsersContainer(grok.Container, Logger):
  • main/waeup.kofa/trunk/src/waeup/kofa/userscontainer.txt

    r7321 r7811  
    1 User container for the SIRP
     1User container for the KOFA
    22***************************
    33
    44.. :doctest:
    5 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     5.. :layer: waeup.kofa.testing.KOFAUnitTestLayer
    66
    77Before we can start, we need some password managers available:
     
    1414us:
    1515
    16     >>> from waeup.sirp.userscontainer import UsersContainer
     16    >>> from waeup.kofa.userscontainer import UsersContainer
    1717    >>> myusers = UsersContainer()
    1818
     
    3131    >>> bob = myusers['bob']
    3232    >>> bob
    33     <waeup.sirp.authentication.Account object at 0x...>
     33    <waeup.kofa.authentication.Account object at 0x...>
    3434
    3535    >>> bob.name
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/api.txt

    r4973 r7811  
    1 :mod:`waeup.sirp.utils` -- misc. helpers
     1:mod:`waeup.kofa.utils` -- misc. helpers
    22****************************************
    33
    4 .. module:: waeup.sirp.utils
     4.. module:: waeup.kofa.utils
    55
    66Components and other stuff of general interest.
     
    99==========
    1010
    11 The :mod:`waeup.sirp.utils` module provides the following submodules:
     11The :mod:`waeup.kofa.utils` module provides the following submodules:
    1212
    1313.. toctree::
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r7649 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """SIRP components for batch processing.
     18"""KOFA components for batch processing.
    1919
    2020Batch processors eat CSV files to add, update or remove large numbers
     
    3131from zope.interface import Interface
    3232from zope.schema import getFields
    33 from waeup.sirp.interfaces import (
     33from waeup.kofa.interfaces import (
    3434    IBatchProcessor, FatalCSVError, DuplicationError, IObjectConverter)
    3535
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.txt

    r6824 r7811  
    1 :mod:`waeup.sirp.utils.batching` -- Batch processing
     1:mod:`waeup.kofa.utils.batching` -- Batch processing
    22****************************************************
    33
     
    188188All we need, is a batch processor now.
    189189
    190     >>> from waeup.sirp.utils.batching import BatchProcessor
     190    >>> from waeup.kofa.utils.batching import BatchProcessor
    191191    >>> class CaveProcessor(BatchProcessor):
    192192    ...   util_name = 'caveprocessor'
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.py

    r7709 r7811  
    2727from zope.interface import Interface
    2828from zope.publisher.browser import TestRequest
    29 from waeup.sirp.interfaces import IObjectConverter
     29from waeup.kofa.interfaces import IObjectConverter
    3030
    3131class ExtendedCheckBoxWidget(CheckBoxWidget):
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.txt

    r7321 r7811  
    1 :mod:`waeup.sirp.utils.converters` -- Converters
     1:mod:`waeup.kofa.utils.converters` -- Converters
    22************************************************
    33
    4 .. module:: waeup.sirp.utils.converters
     4.. module:: waeup.kofa.utils.converters
    55
    66Converters for :mod:`zope.schema` based data.
     
    1010
    1111.. :NOdoctest:
    12 .. :NOlayer: waeup.sirp.testing.SIRPUnitTestLayer
     12.. :NOlayer: waeup.kofa.testing.KOFAUnitTestLayer
    1313
    1414
     
    2121   'non-values'. Current setting is:
    2222
    23       >>> from waeup.sirp.utils.converters import NONE_STRING_VALUE
     23      >>> from waeup.kofa.utils.converters import NONE_STRING_VALUE
    2424      >>> NONE_STRING_VALUE
    2525      ''
     
    3232========
    3333
    34 The :mod:`waeup.sirp.utils.converters` module is basically a collection of
     34The :mod:`waeup.kofa.utils.converters` module is basically a collection of
    3535adapters for field types of :mod:`zope.schema`.
    3636
     
    4848   `zope.schema.Choice` or similar.
    4949
    50    .. method:: provides(waeup.sirp.interfaces.ISchemaTypeConverter)
     50   .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
    5151
    5252   .. method:: _convertValueFromString(string)
     
    111111   .. method:: adapts(zope.schema.IText)
    112112
    113    .. method:: provides(waeup.sirp.interfaces.ISchemaTypeConverter)
     113   .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
    114114
    115115   .. method:: fromString(string[, strict=True])
     
    150150   .. method:: adapts(zope.schema.IBool)
    151151
    152    .. method:: provides(waeup.sirp.interfaces.ISchemaTypeConverter)
     152   .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
    153153
    154154   .. method:: fromString(string[, strict=True])
     
    191191   .. method:: adapts(zope.schema.IInt)
    192192
    193    .. method:: provides(waeup.sirp.interfaces.ISchemaTypeConverter)
     193   .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
    194194
    195195   .. method:: fromString(string[, strict=True])
     
    232232   .. method:: adapts(zope.schema.IChoice)
    233233
    234    .. method:: provides(waeup.sirp.interfaces.ISchemaTypeConverter)
     234   .. method:: provides(waeup.kofa.interfaces.ISchemaTypeConverter)
    235235
    236236   .. method:: fromString(string[, strict=False])
     
    272272----------------------
    273273
    274 .. autoclass:: waeup.sirp.utils.converters.DateConverter
     274.. autoclass:: waeup.kofa.utils.converters.DateConverter
    275275   :members:
    276276   :inherited-members:
     
    294294:class:`TextConverter` instance:
    295295
    296     >>> from waeup.sirp.utils.converters import TextConverter
     296    >>> from waeup.kofa.utils.converters import TextConverter
    297297    >>> converter = TextConverter(field)
    298298
    299299Or we can just grab a registered adapter:
    300300
    301     >>> from waeup.sirp.interfaces import ISchemaTypeConverter
     301    >>> from waeup.kofa.interfaces import ISchemaTypeConverter
    302302    >>> converter = ISchemaTypeConverter(field)
    303303
     
    305305
    306306    >>> converter
    307     <waeup.sirp.utils.converters.TextConverter object at 0x...>
     307    <waeup.kofa.utils.converters.TextConverter object at 0x...>
    308308
    309309Now we can convert strings to this type:
     
    382382:class:`BoolConverter` instance:
    383383
    384     >>> from waeup.sirp.utils.converters import BoolConverter
     384    >>> from waeup.kofa.utils.converters import BoolConverter
    385385    >>> converter = BoolConverter(field)
    386386
    387387Or we can just grab a registered adapter:
    388388
    389     >>> from waeup.sirp.interfaces import ISchemaTypeConverter
     389    >>> from waeup.kofa.interfaces import ISchemaTypeConverter
    390390    >>> converter = ISchemaTypeConverter(field)
    391391
     
    393393
    394394    >>> converter
    395     <waeup.sirp.utils.converters.BoolConverter object at 0x...>
     395    <waeup.kofa.utils.converters.BoolConverter object at 0x...>
    396396
    397397Now we can convert strings to this type:
     
    494494:class:`IntConverter` instance:
    495495
    496     >>> from waeup.sirp.utils.converters import IntConverter
     496    >>> from waeup.kofa.utils.converters import IntConverter
    497497    >>> converter = IntConverter(field)
    498498
    499499Or we can just grab a registered adapter:
    500500
    501     >>> from waeup.sirp.interfaces import ISchemaTypeConverter
     501    >>> from waeup.kofa.interfaces import ISchemaTypeConverter
    502502    >>> converter = ISchemaTypeConverter(field)
    503503
     
    505505
    506506    >>> converter
    507     <waeup.sirp.utils.converters.IntConverter object at 0x...>
     507    <waeup.kofa.utils.converters.IntConverter object at 0x...>
    508508
    509509Now we can convert strings to this type:
     
    597597:class:`ChoiceConverter` instance:
    598598
    599     >>> from waeup.sirp.utils.converters import ChoiceConverter
     599    >>> from waeup.kofa.utils.converters import ChoiceConverter
    600600    >>> converter = ChoiceConverter(field)
    601601
    602602Or we can just grab a registered adapter:
    603603
    604     >>> from waeup.sirp.interfaces import ISchemaTypeConverter
     604    >>> from waeup.kofa.interfaces import ISchemaTypeConverter
    605605    >>> converter = ISchemaTypeConverter(field)
    606606
     
    608608
    609609    >>> converter
    610     <waeup.sirp.utils.converters.ChoiceConverter object at 0x...>
     610    <waeup.kofa.utils.converters.ChoiceConverter object at 0x...>
    611611
    612612Now we can convert strings to this type:
     
    672672    '1'
    673673
    674     >>> from waeup.sirp.interfaces import SimpleSIRPVocabulary
     674    >>> from waeup.kofa.interfaces import SimpleKOFAVocabulary
    675675    >>> field = Choice(
    676676    ...   title = u'Favourite Dish',
    677677    ...   default = 0,
    678     ...   vocabulary = SimpleSIRPVocabulary(
     678    ...   vocabulary = SimpleKOFAVocabulary(
    679679    ...        ('N/A', 0), ('Pizza', 1),
    680680    ...        ('Cake', 2), ('Muffins', 3)),
     
    730730
    731731We get a converter for this field in the usual way. The
    732 :meth:`waeup.sirp.utils.converters.fromString()` method will return one of
     732:meth:`waeup.kofa.utils.converters.fromString()` method will return one of
    733733the objects if we feed it with ``'Wilma'`` or ``'Fred'``:
    734734
     
    763763:class:`IntConverter` instance:
    764764
    765     >>> from waeup.sirp.utils.converters import DateConverter
     765    >>> from waeup.kofa.utils.converters import DateConverter
    766766    >>> converter = DateConverter(field)
    767767
    768768Or we can just grab a registered adapter:
    769769
    770     >>> from waeup.sirp.interfaces import ISchemaTypeConverter
     770    >>> from waeup.kofa.interfaces import ISchemaTypeConverter
    771771    >>> converter = ISchemaTypeConverter(field)
    772772
     
    774774
    775775    >>> converter
    776     <waeup.sirp.utils.converters.DateConverter object at 0x...>
     776    <waeup.kofa.utils.converters.DateConverter object at 0x...>
    777777
    778778Now we can convert strings to this type:
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py

    r7359 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """General helper functions for SIRP.
     18"""General helper functions for KOFA.
    1919"""
    2020import os
     
    151151    instances of certain classes when called.
    152152
    153     In :mod:`waeup.sirp` we use factories extensively for
     153    In :mod:`waeup.kofa` we use factories extensively for
    154154    batching. While processing a batch some importer looks up a
    155155    factory to create real-world instances that then get filled with
     
    163163
    164164       >>> import grok
    165        >>> from waeup.sirp.utils.helpers import FactoryBase
     165       >>> from waeup.kofa.utils.helpers import FactoryBase
    166166       >>> class MyObject(object):
    167167       ...   # Some class we want to get instances of.
     
    169169       >>> class MyObjectFactory(FactoryBase):
    170170       ...   # This is the factory for MyObject instances
    171        ...   grok.name(u'waeup.sirp.factory.MyObject')
     171       ...   grok.name(u'waeup.kofa.factory.MyObject')
    172172       ...   factory = MyObject
    173173
     
    176176    called. The given name must even be unique amongst all utilities
    177177    registered during runtime. While you can pick any name you like
    178     you might want to prepend ``waeup.sirp.factory.`` to the name
     178    you might want to prepend ``waeup.kofa.factory.`` to the name
    179179    string to make sure it does not clash with names of other
    180180    utilities one day.
     
    183183    freshly defined factory. This executes all the component
    184184    registration stuff we don't want to do ourselves. In daily use
    185     this is done automatically on startup of a :mod:`waeup.sirp`
     185    this is done automatically on startup of a :mod:`waeup.kofa`
    186186    system.
    187187
    188        >>> grok.testing.grok('waeup.sirp.utils.helpers')
     188       >>> grok.testing.grok('waeup.kofa.utils.helpers')
    189189       >>> grok.testing.grok_component(
    190190       ...    'MyObjectFactory', MyObjectFactory
     
    197197
    198198       >>> from zope.component import createObject
    199        >>> obj = createObject('waeup.sirp.factory.MyObject')
     199       >>> obj = createObject('waeup.kofa.factory.MyObject')
    200200       >>> isinstance(obj, MyObject)
    201201       True
     
    207207       >>> from zope.component.interfaces import IFactory
    208208       >>> factory = getUtility(
    209        ...   IFactory, name='waeup.sirp.factory.MyObject'
     209       ...   IFactory, name='waeup.kofa.factory.MyObject'
    210210       ...   )
    211211       >>> isinstance(factory, MyObjectFactory)
     
    251251    HTML code:
    252252
    253         >>> from waeup.sirp.utils.helpers import ReST2HTML
     253        >>> from waeup.kofa.utils.helpers import ReST2HTML
    254254        >>> source = '''
    255255        ... Headline
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.txt

    r7496 r7811  
    1 :mod:`waeup.sirp.utils.helpers` -- Helpers for SIRP
     1:mod:`waeup.kofa.utils.helpers` -- Helpers for KOFA
    22***************************************************
    33
    4 .. module:: waeup.sirp.utils.helpers
    5 
    6 Helper functions for SIRP.
     4.. module:: waeup.kofa.utils.helpers
     5
     6Helper functions for KOFA.
    77
    88.. :doctest:
     
    2121     >>> os.chdir(new_location)
    2222
    23      >>> from waeup.sirp.utils.helpers import remove_file_or_directory
     23     >>> from waeup.kofa.utils.helpers import remove_file_or_directory
    2424     >>> open('blah', 'wb').write('nonsense')
    2525     >>> 'blah' in os.listdir('.')
     
    7272     >>> open(os.path.join('src', 'blah'), 'wb').write('nonsense')
    7373
    74      >>> from waeup.sirp.utils.helpers import copy_filesystem_tree
     74     >>> from waeup.kofa.utils.helpers import copy_filesystem_tree
    7575     >>> result = copy_filesystem_tree('src', 'dst')
    7676
     
    179179   returned with all preceeding/following stuff stripped:
    180180
    181      >>> from waeup.sirp.utils.helpers import get_inner_HTML_part
     181     >>> from waeup.kofa.utils.helpers import get_inner_HTML_part
    182182     >>> print get_inner_HTML_part("""<html>
    183183     ... <head>
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/importexport.py

    r7321 r7811  
    2222from cStringIO import StringIO
    2323from zope.interface import Interface
    24 from waeup.sirp.interfaces import (ISIRPObject, ISIRPExporter,
    25                                    ISIRPXMLExporter, ISIRPXMLImporter)
     24from waeup.kofa.interfaces import (IKOFAObject, IKOFAExporter,
     25                                   IKOFAXMLExporter, IKOFAXMLImporter)
    2626
    2727def readFile(f):
     
    4040
    4141class Exporter(grok.Adapter):
    42     """Export a SIRP 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(ISIRPObject)
    48     grok.provides(ISIRPExporter)
     47    grok.context(IKOFAObject)
     48    grok.provides(IKOFAExporter)
    4949
    5050    def __init__(self, context):
     
    6161
    6262class XMLExporter(grok.Adapter):
    63     """Export a SIRP 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(ISIRPXMLExporter)
     69    grok.provides(IKOFAXMLExporter)
    7070
    7171    def __init__(self, context):
    7272        self.context = context
    73    
     73
    7474    def export(self, filepath=None):
    7575        pickled_obj = cPickle.dumps(self.context)
     
    8484
    8585class XMLImporter(grok.Adapter):
    86     """Import a SIRP object from XML.
     86    """Import a KOFA object from XML.
    8787    """
    8888    grok.context(Interface)
    89     grok.provides(ISIRPXMLImporter)
     89    grok.provides(IKOFAXMLImporter)
    9090
    9191    def __init__(self, context):
    9292        self.context = context
    93    
     93
    9494    def doImport(self, filepath):
    9595        xml = None
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/importexport.txt

    r7321 r7811  
    66
    77.. :doctest:
    8 .. :layer: waeup.sirp.testing.SIRPUnitTestLayer
     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.sirp.interfaces import ISIRPXMLExporter
    63     >>> exporter = ISIRPXMLExporter(mycave)
     62    >>> from waeup.kofa.interfaces import IKOFAXMLExporter
     63    >>> exporter = IKOFAXMLExporter(mycave)
    6464    >>> exporter
    65     <waeup.sirp.utils.importexport.XMLExporter object at 0x...>
     65    <waeup.kofa.utils.importexport.XMLExporter object at 0x...>
    6666
    6767All exporters provide an ``export(<obj>)`` method::
     
    101101Now we create an importer for that object:
    102102
    103     >>> from waeup.sirp.interfaces import ISIRPXMLImporter
    104     >>> importer = ISIRPXMLImporter(mycave)
     103    >>> from waeup.kofa.interfaces import IKOFAXMLImporter
     104    >>> importer = IKOFAXMLImporter(mycave)
    105105
    106106Importing from filenames
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/logger.py

    r7651 r7811  
    1919Convenience stuff for logging.
    2020
    21 Main component of :mod:`waeup.sirp.utils.logging` is a mix-in class
    22 :class:`waeup.sirp.utils.logging.Logger`. Classes derived (also) from
     21Main component of :mod:`waeup.kofa.utils.logging` is a mix-in class
     22:class:`waeup.kofa.utils.logging.Logger`. Classes derived (also) from
    2323that mix-in provide a `logger` attribute that returns a regular Python
    2424logger logging to a rotating log file stored in the datacenter storage
     
    3030The `logger_name` tells under which name the logger should be
    3131registered Python-wise. This is usually a dotted name string like
    32 ``waeup.sirp.${sitename}.mycomponent`` which should be unique. If you
     32``waeup.kofa.${sitename}.mycomponent`` which should be unique. If you
    3333pick a name already used by another component, trouble is ahead. The
    3434``${sitename}`` chunk of the name can be set literally like this. The
     
    4646your `logger_name` and `logger_filename` attribute and off you go::
    4747
    48   from waeup.sirp.utils.logger import Logger
     48  from waeup.kofa.utils.logger import Logger
    4949
    5050  class MyComponent(object, Logger):
    5151      # Yes that's a complete working class
    52       logger_name = 'waeup.sirp.${sitename}.mycomponent
     52      logger_name = 'waeup.kofa.${sitename}.mycomponent
    5353      logger_filename = 'mycomponent.log'
    5454
     
    6767
    6868The datacenter and its storage are created automatically when you
    69 create a :class:`waeup.sirp.app.University`. This also means that
     69create a :class:`waeup.kofa.app.University`. This also means that
    7070logging with the `Logger` mix-in will work only inside so-called sites
    7171(`University` instances put into ZODB are such `sites`).
     
    8080from zope.component import queryUtility
    8181from zope.interface import Interface, Attribute, implements
    82 from waeup.sirp.interfaces import (
     82from waeup.kofa.interfaces import (
    8383    IDataCenter, IDataCenterStorageMovedEvent, ILoggerCollector)
    84 from waeup.sirp.utils.helpers import get_current_principal
     84from waeup.kofa.utils.helpers import get_current_principal
    8585
    8686#: Default logfile size (5 KB)
     
    152152
    153153    #: The Python logger name used when
    154     #: logging. ``'waeup.sirp.${sitename}'`` by default. You can use the
     154    #: logging. ``'waeup.kofa.${sitename}'`` by default. You can use the
    155155    #: ``${sitename}`` placeholder in that string, which will be
    156156    #: replaced by the actual used site name.
    157     logger_name = 'waeup.sirp.${sitename}'
     157    logger_name = 'waeup.kofa.${sitename}'
    158158    implements(ILogger)
    159159
     
    378378    return
    379379
    380 from waeup.sirp.interfaces import IUniversity
     380from waeup.kofa.interfaces import IUniversity
    381381@grok.subscribe(IUniversity, grok.IObjectRemovedEvent)
    382382def handle_site_removed(obj, event):
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_batching.py

    r7196 r7811  
    2727from zope.component.interfaces import IFactory
    2828from zope.interface import Interface, implements
    29 from waeup.sirp.app import University
    30 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
     29from waeup.kofa.app import University
     30from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
    3131
    3232optionflags = (
     
    7171stoneville = dict
    7272
    73 from waeup.sirp.utils.batching import BatchProcessor
     73from waeup.kofa.utils.batching import BatchProcessor
    7474class CaveProcessor(BatchProcessor):
    7575    util_name = 'caveprocessor'
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_converters.py

    r7649 r7811  
    3131    Interface, implements, invariant, Invalid, implementedBy)
    3232
    33 from waeup.sirp.app import University
    34 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    35 from waeup.sirp.university import Faculty
    36 from waeup.sirp.utils.converters import IObjectConverter
    37 from waeup.sirp.utils.helpers import attrs_to_fields
    38 from waeup.sirp.interfaces import SimpleSIRPVocabulary
    39 
    40 colors = SimpleSIRPVocabulary(
     33from waeup.kofa.app import University
     34from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     35from waeup.kofa.university import Faculty
     36from waeup.kofa.utils.converters import IObjectConverter
     37from waeup.kofa.utils.helpers import attrs_to_fields
     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 = SimpleSIRPVocabulary(
     45car_nums = SimpleKOFAVocabulary(
    4646    ('None', 0),
    4747    ('One', 1),
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_doctests.py

    r7196 r7811  
    1818"""Register doctests from utils subpackage.
    1919"""
    20 from waeup.sirp.testing import get_doctest_suite
     20from waeup.kofa.testing import get_doctest_suite
    2121
    2222def test_suite():
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_helpers.py

    r7196 r7811  
    2727from zope.security.testing import Principal, Participation
    2828from zope.security.management import newInteraction, endInteraction
    29 from waeup.sirp.utils import helpers
     29from waeup.kofa.utils import helpers
    3030
    3131from zope.interface import Interface, implements
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_logger.py

    r7651 r7811  
    1717##
    1818
    19 # Tests for waeup.sirp.utils.logger
     19# Tests for waeup.kofa.utils.logger
    2020import logging
    2121import os
     
    2525from zope.component.hooks import setSite, clearSite
    2626from zope.interface.verify import verifyClass, verifyObject
    27 from waeup.sirp.app import University
    28 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    29 
    30 from waeup.sirp.utils.logger import (
     27from waeup.kofa.app import University
     28from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     29
     30from waeup.kofa.utils.logger import (
    3131    Logger, MAX_BYTES, BACKUP_COUNT, ILoggerCollector, LoggerCollector,
    3232    ILogger)
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py

    r7744 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """General helper utilities for SIRP.
     18"""General helper utilities for KOFA.
    1919"""
    2020import os
     
    2323from zope.i18n import translate
    2424from random import SystemRandom as r
    25 from waeup.sirp.interfaces import ISIRPUtils
    26 from waeup.sirp.interfaces import MessageFactory as _
    27 from waeup.sirp.smtp import send_mail as send_mail_internally
     25from waeup.kofa.interfaces import IKOFAUtils
     26from waeup.kofa.interfaces import MessageFactory as _
     27from waeup.kofa.smtp import send_mail as send_mail_internally
    2828
    2929def send_mail(from_name,from_addr,rcpt_name,rcpt_addr,subject,body,config):
    30     """Wrapper for the real SMTP functionality in :mod:`waeup.sirp.smtp`.
     30    """Wrapper for the real SMTP functionality in :mod:`waeup.kofa.smtp`.
    3131
    3232    Merely here to stay compatible with lots of calls to this place.
     
    3737    return True
    3838
    39 class SIRPUtils(grok.GlobalUtility):
     39class KOFAUtils(grok.GlobalUtility):
    4040    """A collection of parameters and methods subject to customization.
    4141    """
    42     grok.implements(ISIRPUtils)
     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
     
    131131            'd':portal,
    132132            'e':body})
    133         body = translate(text, 'waeup.sirp',
     133        body = translate(text, 'waeup.kofa',
    134134            target_language=self.PORTAL_LANGUAGE)
    135135        return send_mail(
     
    161161        Returns True or False to indicate successful operation.
    162162        """
    163         subject = 'Your SIRP credentials'
     163        subject = 'Your KOFA credentials'
    164164        text = _(u"""Dear ${a},
    165165
     
    193193            'f':login_url})
    194194
    195         body = translate(text, 'waeup.sirp',
     195        body = translate(text, 'waeup.kofa',
    196196            target_language=self.PORTAL_LANGUAGE)
    197197        return send_mail(
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/objectwidget.py

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

    r7670 r7811  
    3131import re
    3232import copy
    33 from waeup.sirp.interfaces import MessageFactory as _
     33from waeup.kofa.interfaces import MessageFactory as _
    3434from zope import schema
    3535from zope.browserpage import ViewPageTemplateFile
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/restwidget.py

    r7705 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """A widget that renders restructured text. 
     18"""A widget that renders restructured text.
    1919"""
    2020from zope.component import getUtility
    2121from zope.formlib.widget import renderElement, DisplayWidget
    22 from waeup.sirp.utils.helpers import ReST2HTML
    23 from waeup.sirp.interfaces import ISIRPUtils
     22from waeup.kofa.utils.helpers import ReST2HTML
     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.SIRPUtils.
     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(ISIRPUtils).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.pt

    r7798 r7811  
    11<table border="0" class="sequencewidget"
    2   i18n:domain="waeup.sirp">
     2  i18n:domain="waeup.kofa">
    33  <tr tal:repeat="widget view/widgets">
    44    <td>
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/sequencewidget.py

    r7802 r7811  
    2929from zope.schema.interfaces import IField, IList
    3030
    31 class SIRPSequenceWidget(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 SIRPSequenceWidget(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_datewidget.py

    r7501 r7811  
    2727    SimpleInputWidgetTest, BrowserWidgetTest, )
    2828from zope.formlib.interfaces import IInputWidget, IDisplayWidget
    29 from waeup.sirp.widgets.datewidget import (
     29from waeup.kofa.widgets.datewidget import (
    3030    FormattedDateWidget, FormattedDateDisplayWidget, )
    3131from zope.formlib.widgets import DateI18nWidget
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/tests/test_objectwidget.py

    r7803 r7811  
    3737from zope.formlib.interfaces import IWidgetInputErrorView
    3838
    39 from waeup.sirp.widgets.objectwidget import SIRPObjectWidget as ObjectWidget
    40 from waeup.sirp.widgets.objectwidget import (
    41     SIRPObjectDisplayWidget as ObjectDisplayWidget)
     39from waeup.kofa.widgets.objectwidget import KOFAObjectWidget as ObjectWidget
     40from waeup.kofa.widgets.objectwidget import (
     41    KOFAObjectDisplayWidget as ObjectDisplayWidget)
    4242
    4343class ITestContact(Interface):
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/tests/test_phonewidget.py

    r7494 r7811  
    3636from zope.publisher.interfaces.browser import IDefaultBrowserLayer
    3737from zope.schema.interfaces import ITextLine
    38 from waeup.sirp.widgets.phonewidget import PhoneWidget
     38from waeup.kofa.widgets.phonewidget import PhoneWidget
    3939
    4040# Dummy content
  • main/waeup.kofa/trunk/src/waeup/kofa/workflow.py

    r7321 r7811  
    2525from zope.security.interfaces import NoInteraction
    2626from zope.security.management import getInteraction
    27 from waeup.sirp.interfaces import ISIRPWorkflowInfo
     27from waeup.kofa.interfaces import IKOFAWorkflowInfo
    2828
    29 class SIRPWorkflow(Workflow):
     29class KOFAWorkflow(Workflow):
    3030    """A :mod:`hurry.workflow` workflow with more appropriate error
    3131       messages.
     
    7171        return False
    7272
    73 class SIRPWorkflowInfo(WorkflowInfo):
     73class KOFAWorkflowInfo(WorkflowInfo):
    7474    """A workflow info that provides a convenience transition getter.
    7575    """
    7676
    77     grok.provides(ISIRPWorkflowInfo)
     77    grok.provides(IKOFAWorkflowInfo)
    7878
    7979    def getManualTransitions(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/zcml.py

    r7576 r7811  
    2121##
    2222from zope.component.zcml import handler
    23 from waeup.sirp.interfaces import IDataCenterConfig
     23from waeup.kofa.interfaces import IDataCenterConfig
    2424
    2525def data_center_conf(context, path):
     
    3232
    3333    - Add to the header:
    34         ``xmlns:sirp="http://namespaces.waeup.org/sirp"``
     34        ``xmlns:kofa="http://namespaces.waeup.org/kofa"``
    3535
    36     - Then, after including waeup.sirp:
    37         ``<sirp:datacenter path="some/existing/file/path" />``
     36    - Then, after including waeup.kofa:
     37        ``<kofa:datacenter path="some/existing/file/path" />``
    3838
    3939    In a running instance (where some directive like above was
     
    4141    IDataCenterConfig utility:
    4242
    43       >>> from waeup.sirp.interfaces import IDataCenterConfig
     43      >>> from waeup.kofa.interfaces import IDataCenterConfig
    4444      >>> from zope.component import getUtility
    4545      >>> getUtility(IDataCenterConfig)
Note: See TracChangeset for help on using the changeset viewer.