interfaces - Main Interfaces Module

class waeup.kofa.interfaces.CaptchaSource[source]

Bases: zc.sourcefactory.basic.BasicSourceFactory

A source for captchas.

__doc__ = 'A source for captchas.\n '
__module__ = 'waeup.kofa.interfaces'
getTitle(value)[source]
getValues()[source]
class waeup.kofa.interfaces.ContextualDictSourceFactoryBase[source]

Bases: waeup.kofa.sourcefactory.SmartBasicContextualSourceFactory

A base for contextual sources based on KofaUtils dicts.

To create a real source, you have to set the DICT_NAME attribute which should be the name of a dictionary in KofaUtils.

__doc__ = 'A base for contextual sources based on KofaUtils dicts.\n\n To create a real source, you have to set the `DICT_NAME` attribute\n which should be the name of a dictionary in KofaUtils.\n '
__module__ = 'waeup.kofa.interfaces'
getTitle(context, value)[source]
getToken(context, value)[source]
getValues(context)[source]
class waeup.kofa.interfaces.DisablePaymentGroupSource[source]

Bases: waeup.kofa.interfaces.ContextualDictSourceFactoryBase

A source for filtering groups of students

DICT_NAME = 'DISABLE_PAYMENT_GROUP_DICT'

name of dict to deliver from kofa utils.

__doc__ = 'A source for filtering groups of students\n '
__module__ = 'waeup.kofa.interfaces'
exception waeup.kofa.interfaces.DuplicationError(msg, entries=[])[source]

Bases: exceptions.Exception

An exception that can be raised when duplicates are found.

When raising DuplicationError you can, beside the usual message, specify a list of objects which are duplicates. These values can be used by catching code to print something helpful or similar.

__doc__ = 'An exception that can be raised when duplicates are found.\n\n When raising :exc:`DuplicationError` you can, beside the usual\n message, specify a list of objects which are duplicates. These\n values can be used by catching code to print something helpful or\n similar.\n '
__init__(msg, entries=[])[source]
__module__ = 'waeup.kofa.interfaces'
__str__()[source]
__weakref__

list of weak references to the object (if defined)

exception waeup.kofa.interfaces.FatalCSVError[source]

Bases: exceptions.Exception

Some row could not be processed.

__doc__ = 'Some row could not be processed.\n '
__module__ = 'waeup.kofa.interfaces'
__weakref__

list of weak references to the object (if defined)

class waeup.kofa.interfaces.GradeSource[source]

Bases: zc.sourcefactory.basic.BasicSourceFactory

A source for exam grades.

__doc__ = 'A source for exam grades.\n '
__module__ = 'waeup.kofa.interfaces'
getTitle(value)[source]
getValues()[source]
interface waeup.kofa.interfaces.IAuthPluginUtility[source]

A component that cares for authentication setup at site creation.

Utilities providing this interface are looked up when a Pluggable Authentication Utility (PAU) for any waeup.kofa.app.University instance is created and put into ZODB.

The setup-code then calls the register method of the utility and expects a modified (or unmodified) version of the PAU back.

This allows to define any authentication setup modifications by submodules or third-party modules/packages.

unregister(pau)

Unregister any plugins not wanted to be in the PAU.

register(pau)

Register any plugins wanted to be in the PAU.

interface waeup.kofa.interfaces.IBatchProcessor[source]

A batch processor that handles mass-operations.

doImport(path, headerfields, mode='create', user='Unknown', logger=None, ignore_empty=True)

Read data from path and update connected object.

headerfields is a list of headerfields as read from the file to import.

mode gives the import mode to use ('create', 'update', or 'remove'.

user is a string describing the user performing the import. Normally fetched from current principal.

logger is the logger to use during import.

ignore_emtpy in update mode ignores empty fields if true.

name

Processor name

interface waeup.kofa.interfaces.ICSVExporter[source]

A CSV file exporter for objects.

export_all(site, filepath=None)

Export all items in site as CSV file.

if filepath is not given, a string with the data should be returned.

get_selected(site, selected)

Get datasets in site to be exported.

The set of data is specified by a list of identifiers.

Returns an iterable.

title

Title

Description to be displayed in selections.

fields

List of fieldnames in resulting CSV

export_selected(site, filepath=None, **kw)

Export items in site specified by a list of identifiers called selected.

If filepath is not given, a string with the data should be returned.

get_filtered(site, **kw)

Get datasets in site to be exported.

The set of data is specified by keywords, which might be different for any implementaion of exporter.

Returns an iterable.

export(iterable, filepath=None)

Export iterables as rows in a CSV file.

If filepath is not given, a string with the data should be returned.

What kind of iterables are acceptable depends on the specific exporter implementation.

export_filtered(site, filepath=None, **kw)

Export those items in site specified by args and kw.

If filepath is not given, a string with the data should be returned.

Which special keywords are supported is up to the respective exporter.

mangle_value(value, name, obj)

Mangle value extracted from obj or suobjects thereof.

This is called by export before actually writing to the result file.

interface waeup.kofa.interfaces.IConfigurationContainer[source]

Extends: waeup.kofa.interfaces.IKofaObject

A container for session configuration objects.

frontpage_dict

Content as language dictionary with values in html format

maintmode_enabled_by

Maintenance Mode enabled by

name

Name of University

email_admin

Email Address of Administrator

acronym

Abbreviated Title of University

next_matric_integer_4

Next Matriculation Number Integer 4

4th integer used for constructing the next matriculation number

carry_over

Carry-over Course Registration

next_matric_integer_3

Next Matriculation Number Integer 3

3rd integer used for constructing the next matriculation number

captcha

Captcha used for public registration pages

smtp_mailer

SMTP mailer to use when sending mail

name_admin

Name of Administrator

export_disabled_message

Export-disabled message

Message which will show up if an officer tries to export data. All exporters are automatcally disabled if this field is set.

email_subject

Subject of Email to Administrator

current_academic_session

Current Academic Session

Session for which score editing is allowed

next_matric_integer_2

Next Matriculation Number Integer 2

2nd integer used for constructing the next matriculation number

addSessionConfiguration(sessionconfiguration)

Add a session configuration object.

frontpage

Content in HTML format

next_matric_integer

Next Matriculation Number Integer

Integer used for constructing the next matriculation number

interface waeup.kofa.interfaces.IContactForm[source]

Extends: waeup.kofa.interfaces.IKofaObject

A contact form.

body

Text:

bcc_to

Bcc to:

email_from

Email Address:

email_to

Email to:

fullname

Full Name:

subject

Subject:

interface waeup.kofa.interfaces.IDataCenter[source]

Extends: waeup.kofa.interfaces.IKofaObject

A data center.

A data center manages files (uploads, downloads, etc.).

Beside providing the bare paths needed to keep files, it also provides some helpers to put results of batch processing into well-defined final locations (with well-defined filenames).

The main use-case is managing of site-related files, i.e. files for import, export etc.

DataCenters are _not_ meant as storages for object-specific files like passport photographs and similar.

It is up to the datacenter implementation how to organize data (paths) inside its storage path.

setStoragePath(path, move=False, overwrite=False)

Set the path where to store files.

If move is True, move over files from the current location to the new one.

If overwrite is also True, overwrite any already existing files of same name in target location.

Triggers a DataCenterStorageMovedEvent.

deleted_path

Path for deleted student data.

storage

Path to directory where everything is kept.

graduated_path

Path for deleted graduated student data.

distProcessedFiles(successful, source_path, finished_file, pending_file, mode='create', move_orig=True)

Distribute processed files over final locations.

getPendingFiles(sort='name')

Get a list of files stored in storage sorted by basename.

getFinishedFiles()

Get a list of files stored in finished subfolder of storage.

interface waeup.kofa.interfaces.IDataCenterConfig[source]
path

Path

Directory where the datacenter should store files by default (adjustable in web UI).

interface waeup.kofa.interfaces.IDataCenterFile[source]

A data center file.

name

Filename

getLinesNumber()

Get number of lines of file.

lines

Number of lines in file

getSize()

Get human readable size of file.

uploaddate

Human readable upload datetime

getDate()

Get creation timestamp from file in human readable form.

size

Human readable file size

interface waeup.kofa.interfaces.IDataCenterStorageMovedEvent[source]

Extends: zope.component.interfaces.IObjectEvent

Emitted, when the storage of a datacenter changes.

interface waeup.kofa.interfaces.IExportContainerFinder[source]

A finder for the central export container.

__call__()

Return the currently used global or site-wide IExportContainer.

interface waeup.kofa.interfaces.IExportJob[source]

Extends: zc.async.interfaces.IJob

failed

True iff the job finished and didn’t provide a file.

finished

True if the job finished.`

__init__(site, exporter_name)
interface waeup.kofa.interfaces.IExportJobContainer[source]

Extends: waeup.kofa.interfaces.IKofaObject

A component that contains (maybe virtually) export jobs.

entry_from_job_id(job_id)

Get entry tuple for job_id.

Returns None if no such entry can be found.

get_export_jobs_status(user_id=None)

Get running/completed export jobs for user_id as list of tuples.

Each tuple holds <raw status>, <status translated>, <exporter title> in that order, where <status translated> and <exporter title> are translated strings representing the status of the job and the human readable title of the exporter used.

delete_export_entry(entry)

Delete the export denoted by entry.

Removes entry from the local running_exports list and also removes the regarding job via the local job manager.

entry is a tuple (<job id>, <exporter name>, <user id>) as created by start_export_job() or returned by get_running_export_jobs().

start_export_job(exporter_name, user_id, *args, **kwargs)

Start asynchronous export job.

exporter_name is the name of an exporter utility to be used.

user_id is the ID of the user that triggers the export.

args positional arguments passed to the export job created.

kwargs keyword arguments passed to the export job.

The job_id is stored along with exporter name and user id in a persistent list.

Returns the job ID of the job started.

get_running_export_jobs(user_id=None)

Get export jobs for user with user_id as list of tuples.

Each tuples holds <job_id>, <exporter_name>, <user_id> in that order. The <exporter_name> is the utility name of the used exporter.

If user_id is None, all running jobs are returned.

interface waeup.kofa.interfaces.IExtFileStore[source]

Extends: hurry.file.interfaces.IFileRetrieval

A file storage that stores files in filesystem (not as blobs).

createFile(filename, f)

Create file given by f with filename filename

Returns a hurry.file.File-based object.

deleteFile(file_id)

Delete file stored under file_id.

Remove file from filestore so, that it is not available anymore on next call to getFile for the same file_id.

Should not complain if no such file exists.

deleteFileByContext(context, attr=None)

Delete file for given context and attr.

Both, context and attr might be used to find (context) and feed (attr) an appropriate file name chooser.

This is a convenience method.

getFile(file_id)

Get raw file data stored under file with file_id.

Returns a file descriptor open for reading or None if the file cannot be found.

root

Root path of file store.

getFileByContext(context, attr=None)

Get raw file data stored for the given context.

Returns a file descriptor open for reading or None if no such file can be found.

Both, context and attr might be used to find (context) and feed (attr) an appropriate file name chooser.

This is a convenience method.

interface waeup.kofa.interfaces.IFailedLoginInfo[source]

Extends: waeup.kofa.interfaces.IKofaObject

Info about failed logins.

Timestamps are supposed to be stored as floats using time.time() or similar.

reset()

Set failed login counters back to zero.

set_values(num=0, last=None)

Set number of failed logins and timestamp of last one.

last

Timestamp

Timestamp of last failed login or None

increase()

Increase the current number of failed logins and set timestamp.

num

Number of failed logins

Number of failed logins

as_tuple()

Get login info as tuple <NUM>, <TIMESTAMP>.

interface waeup.kofa.interfaces.IFieldConverter[source]
request_data(name, value, schema_field, prefix='', mode='create')

Create a dict with key-value mapping as created by a request.

name and value are expected to be parsed from CSV or a similar input and represent an attribute to be set to a representation of value.

mode gives the mode of import.

update_request_data() is then requested to turn this name and value into vars as they would be sent by a regular form submit. This means we do not create the real values to be set but we only define the values that would be sent in a browser request to request the creation of those values.

The returned dict should contain names and values of a faked browser request for the given schema_field.

Field converters are normally registered as adapters to some specific zope.schema field.

interface waeup.kofa.interfaces.IFileStoreHandler[source]

Filestore handlers handle specific files for file stores.

If a file to store/get provides a specific filename, a file store looks up special handlers for that type of file.

createFile(store, root, filename, file_id, file)

Return some hurry.file based on store and file_id.

Some kind of callback method called by file stores to create file objects from file_id.

Returns a tuple (raw_file, path, file_like_obj) where the file_like_obj should be a HurryFile, a KofaImageFile or similar. raw_file is the (maybe changed) input file and path the relative internal path to store the file at.

Please make sure the raw_file is opened for reading and the file descriptor set at position 0 when returned.

This method also gets the raw input file object that is about to be stored and is expected to raise any exceptions if some kind of validation or similar fails.

pathFromFileID(store, root, filename)

Turn file id into path to store.

Returned path should be absolute.

interface waeup.kofa.interfaces.IFileStoreNameChooser[source]

Extends: zope.container.interfaces.INameChooser

See zope.container.interfaces.INameChooser for base methods.

checkName(name, attr=None)

Check whether an object name is valid.

Raises a user error if the name is not valid.

chooseName(name, attr=None)

Choose a unique valid file id for the object.

The given name may be taken into account when choosing the name (file id).

chooseName is expected to always choose a valid file id (that would pass the checkName test) and never raise an error.

If attr is not None it might been taken into account as well when generating the file id. Usual behaviour is to interpret attr as a hint for what type of file for a given context should be stored if there are several types possible. For instance for a certain student some file could be the connected passport photograph or some certificate scan or whatever. Each of them has to be stored in a different location so setting attr to a sensible value should give different file ids returned.

interface waeup.kofa.interfaces.IFilteredCatalogQuery[source]

Extends: waeup.kofa.interfaces.IFilteredQuery

A catalog-based query for objects.

query_catalog(catalog)

Query catalog with the parameters passed to constructor.

cat_name

Registered name of the catalog to search.

interface waeup.kofa.interfaces.IFilteredQuery[source]

Extends: waeup.kofa.interfaces.IKofaObject

A query for objects.

__init__(**parameters)

Instantiate a filtered query by passing in parameters.

query()

Get an iterable of objects denoted by the set parameters.

The search should be applied to objects inside current site. It’s the caller’s duty to set the correct site before.

Result can be any iterable like a catalog result set, a list, or similar.

defaults

Default Parameters

interface waeup.kofa.interfaces.IJobContainer[source]

Extends: zope.container.interfaces.IContainer

A job container contains IJob objects.

interface waeup.kofa.interfaces.IJobManager[source]

Extends: waeup.kofa.interfaces.IKofaObject

A manager for asynchronous running jobs (tasks).

start_test_job(site=None)

Start a test job.

jobs(site=None)

Get an iterable of jobs stored.

get(job_id, site=None)

Get the job with id job_id.

For the site parameter see put().

remove(job_id, site=None)

Remove job with job_id from stored jobs.

put(job, site=None)

Put a job into task queue.

If no site is given, queue job in context of current local site.

Returns a job_id to identify the put job. This job_id is needed for further references to the job.

interface waeup.kofa.interfaces.IKofaContained[source]

Extends: waeup.kofa.interfaces.IKofaObject

An item contained in an IKofaContainer.

interface waeup.kofa.interfaces.IKofaContainer[source]

Extends: waeup.kofa.interfaces.IKofaObject

A container for Kofa objects.

interface waeup.kofa.interfaces.IKofaExporter[source]

An exporter for objects.

export(obj, filepath=None)

Export by pickling.

Returns a file-like object containing a representation of obj.

This is done using pickle. If filepath is None, a cStringIO object is returned, that contains the saved data.

interface waeup.kofa.interfaces.IKofaObject[source]

A Kofa object.

This is merely a marker interface.

interface waeup.kofa.interfaces.IKofaPluggable[source]

A component that might be plugged into a Kofa Kofa app.

Components implementing this interface are referred to as ‘plugins’. They are normally called when a new waeup.kofa.app.University instance is created.

Plugins can setup and update parts of the central site without the site object (normally a waeup.kofa.app.University object) needing to know about that parts. The site simply collects all available plugins, calls them and the plugins care for their respective subarea like the applicants area or the datacenter area.

Currently we have no mechanism to define an order of plugins. A plugin should therefore make no assumptions about the state of the site or other plugins being run before and instead do appropriate checks if necessary.

Updates can be triggered for instance by the respective form in the site configuration. You normally do updates when the underlying software changed.

setup(site, name, logger)

Create an instance of the plugin.

The method is meant to be called by the central app (site) when it is created.

site:
The site that requests a setup.
name:
The name under which the plugin was registered (utility name).
logger:
A standard Python logger for the plugins use.
update(site, name, logger)

Method to update an already existing plugin.

This might be called by a site when something serious changes. It is a poor-man replacement for Zope generations (but probably more comprehensive and better understandable).

site:
The site that requests an update.
name:
The name under which the plugin was registered (utility name).
logger:
A standard Python logger for the plugins use.
interface waeup.kofa.interfaces.IKofaPrincipal[source]

Extends: zope.security.interfaces.IGroupClosureAwarePrincipal

A principle for Kofa Kofa.

This interface extends zope.security.interfaces.IPrincipal and requires also an id and other attributes defined there.

user_type

The user type of the principal

email

Email Address

public_name

Public Name

phone

Phone

interface waeup.kofa.interfaces.IKofaPrincipalInfo[source]

Extends: zope.pluggableauth.interfaces.IPrincipalInfo

Infos about principals that are users of Kofa Kofa.

user_type

The type of a user

email

The email address of a user

public_name

The public name of a user

phone

The phone number of a user

interface waeup.kofa.interfaces.IKofaUtils[source]

A collection of methods which are subject to customization.

PORTAL_LANGUAGE

Dict of global language setting

EXAM_GRADES

Dict of examination grades

STUDY_MODES_DICT

Dict of study modes

genPassword(length, chars)

Generate a random password.

sendContactForm(from_name, from_addr, rcpt_name, rcpt_addr, from_username, usertype, portal, body, subject)

Send an email with data provided by forms.

SYSTEM_MAX_LOAD

Dict of maximum system loads.

TEMP_PASSWORD_MINUTES

Temporary passwords and parents password validity period

SEMESTER_DICT

Dict of semesters or trimesters

INST_TYPES_DICT

Dict if institution types

APP_CATS_DICT

Dict of application categories

MONTHS_DICT

Dict of months of the year

PREFERRED_LANGUAGES_DICT

Dict of preferred languages

sendCredentials(user, password, url_info, msg)

Send credentials as email.

Input is the applicant for which credentials are sent and the password.

Returns True or False to indicate successful operation.

fullname(firstname, lastname, middlename)

Full name constructor.

EXAM_SUBJECTS_DICT

Dict of examination subjects

interface waeup.kofa.interfaces.IKofaWorkflowInfo[source]

Extends: hurry.workflow.interfaces.IWorkflowInfo

A hurry.workflow.workflow.WorkflowInfo with additional methods for convenience.

getManualTransitions()

Get allowed manual transitions.

Get a sorted list of tuples containing the transition_id and title of each allowed transition.

interface waeup.kofa.interfaces.IKofaXMLExporter[source]

An XML exporter for objects.

export(obj, filepath=None)

Export as XML.

Returns an XML representation of obj.

If filepath is None, a StringIO` object is returned, that contains the transformed data.

interface waeup.kofa.interfaces.IKofaXMLImporter[source]

An XML import for objects.

doImport(filepath)

Create Python object from XML.

Returns a Python object.

interface waeup.kofa.interfaces.ILocalRoleSetEvent[source]

Extends: zope.component.interfaces.IObjectEvent

A local role was granted/revoked for a principal on an object.

granted

Boolean. If false, then the role was revoked.

principal_id

The principal id for which the role was granted/revoked.

role_id

The role id that was set.

interface waeup.kofa.interfaces.ILocalRolesAssignable[source]

The local roles assignable to an object.

__call__()

Returns a list of dicts.

Each dict contains a name referring to the role assignable for the specified object and a title to describe the range of users to which this role can be assigned.

interface waeup.kofa.interfaces.ILogger[source]

A logger cares for setup, update and restarting of a Python logger.

setup()

Create a Python logging.Logger instance.

The created logger is based on the params given by constructor.

update(**options)

Update the logger.

Updates the logger respecting modified options and changed paths.

logger

A logging.Logger instance

__init__(name, filename=None, site=None, **options)

Create a Kofa logger instance.

interface waeup.kofa.interfaces.ILoggerCollector[source]
getLoggers(site)

Return all loggers registered for site.

registerLogger(site, logging_component)

Register a logging component residing in site.

unregisterLogger(site, logging_component)

Unregister a logger.

interface waeup.kofa.interfaces.IMailService[source]

A mail service.

__call__()

Get the default mail delivery.

interface waeup.kofa.interfaces.IObjectConverter[source]

Object converters are available as simple adapters, adapting interfaces (not regular instances).

fromStringDict(self, data_dict, context, form_fields=None)

Convert values in data_dict.

Converts data in data_dict into real values based on context and form_fields.

data_dict is a mapping (dict) from field names to values represented as strings.

The fields (keys) to convert can be given in optional form_fields. If given, form_fields should be an instance of zope.formlib.form.Fields. Suitable instances are for example created by grok.AutoFields.

If no form_fields are given, a default is computed from the associated interface.

The context can be an existing object (implementing the associated interface) or a factory name. If it is a string, we try to create an object using zope.component.createObject().

Returns a tuple (<FIELD_ERRORS>, <INVARIANT_ERRORS>, <DATA_DICT>) where

<FIELD_ERRORS>
is a list of tuples (<FIELD_NAME>, <ERROR>) for each error that happened when validating the input data in data_dict
<INVARIANT_ERRORS>
is a list of invariant errors concerning several fields
<DATA_DICT>
is a dict with the values from input dict converted.

If errors happen, i.e. the error lists are not empty, always an empty <DATA_DICT> is returned.

If <DATA_DICT> is non-empty, there were no errors.

interface waeup.kofa.interfaces.IObjectHistory[source]
addMessage(message)

Add a message.

messages

List of messages stored

interface waeup.kofa.interfaces.IObjectUpgradeEvent[source]

Extends: zope.component.interfaces.IObjectEvent

Can be fired, when an object shall be upgraded.

interface waeup.kofa.interfaces.IPDF[source]

A PDF representation of some context.

__call__(view=None, note=None)

Create a bytestream representing a PDF from context.

If view is passed in additional infos might be rendered into the document.

note is optional HTML rendered at bottom of the created PDF. Please consider the limited reportlab support for HTML, but using font-tags and friends you certainly can get the desired look.

interface waeup.kofa.interfaces.IPasswordValidator[source]

A password validator utility.

validate_secure_password(self, pw, pw_repeat)

Validates a password by comparing it with control password and checks password strength by matching with the regular expression:

^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).{8,}$

^ Start anchor (?=.*[A-Z]) Ensure password has one uppercase letters. (?=.*[0-9]) Ensure password has one digit. (?=.*[a-z]) Ensure password has one lowercase letter. .{8,} Ensure password is of length 8. $ End anchor.

validate_password(password, password_repeat)

Validates a password by comparing it with control password and checking some other requirements.

interface waeup.kofa.interfaces.IProgressable[source]

A component that can indicate its progress status.

percent

Percent of job done already.

interface waeup.kofa.interfaces.IQueryResultItem[source]

An item in a search result.

url

URL that links to the found item

description

Longer description of the item found.

title

Title displayed in search results.

interface waeup.kofa.interfaces.IRefereeEntry[source]

A referee entry.

email

Email Address

Email Address

name

Name

Name

email_sent

True if email has been sent

interface waeup.kofa.interfaces.IRefereeEntryField[source]

Extends: zope.schema.interfaces.IObject

A zope.schema-like field for usage in interfaces.

Marker interface to distuingish referee entries from ordinary object fields. Needed for registration of widgets.

interface waeup.kofa.interfaces.IResultEntry[source]

A school grade entry.

grade

Grade

subject

Subject

interface waeup.kofa.interfaces.IResultEntryField[source]

Extends: zope.schema.interfaces.IObject

A zope.schema-like field for usage in interfaces.

Marker interface to distuingish result entries from ordinary object fields. Needed for registration of widgets.

interface waeup.kofa.interfaces.ISessionConfiguration[source]

Extends: waeup.kofa.interfaces.IKofaObject

A session configuration object.

clearance_enabled

Clearance enabled

payment_disabled

Payment disabled

academic_session

Academic Session

transcript_fee

Transcript Fee

booking_fee

Bed Booking Fee

transfer_fee

Transfer Fee

coursereg_deadline

Course Reg. Deadline

Example: 2011-12-31 23:59:59+01:00

maint_fee

Rent (fallback)

late_registration_fee

Late Course Reg. Fee

getSessionString()

Return the session string from the vocabulary.

clearance_fee

Acceptance Fee

interface waeup.kofa.interfaces.ISessionConfigurationAdd[source]

Extends: waeup.kofa.interfaces.ISessionConfiguration

A session configuration object in add mode.

academic_session

Academic Session

interface waeup.kofa.interfaces.ISiteLoggers[source]
loggers

A list or generator of registered KofaLoggers

unregister(name)

Unregister a once registered logger.

register(name, filename=None, site=None, **options)

Register a logger name which logs to filename.

If filename is not given, logfile will be name with .log as filename extension.

interface waeup.kofa.interfaces.IUniversity[source]

Extends: waeup.kofa.interfaces.IKofaObject

Representation of a university.

interface waeup.kofa.interfaces.IUserAccount[source]

Extends: waeup.kofa.interfaces.IKofaObject

A user account.

name

User Id

Login name of user

roles

Portal Roles

title

Full Name

email

Email Address

public_name

Public Name

Substitute for officer’s real name in student object histories and in local roles tables.

phone

Phone

failed_logins

FailedLoginInfo for this account

suspended

Account suspended

If set, the account is immediately blocked.

description

Description/Notice

interface waeup.kofa.interfaces.IUsersContainer[source]

Extends: waeup.kofa.interfaces.IKofaObject

A container for officers.

delUser(name)

Delete a user if it exists.

addUser(name, password, title=None, description=None)

Add a user.

exception waeup.kofa.interfaces.InvalidPhoneNumber[source]

Bases: zope.schema._bootstrapinterfaces.ValidationError

Invalid phone number

__doc__ = u'Invalid phone number'
__module__ = 'waeup.kofa.interfaces'
waeup.kofa.interfaces.JOB_STATUS_MAP = {u'new-status': ('new', u'new'), u'pending-status': ('pending', u'pending'), u'callback-status': ('callbacks', u'callbacks'), u'assigned-status': ('assigned', u'assigned'), u'completed-status': ('completed', u'completed'), u'active-status': ('active', u'active')}

A dict giving job status as tuple (<STRING>, <TRANSLATED_STRING>), the latter for UI purposes.

class waeup.kofa.interfaces.MonthSource[source]

Bases: zc.sourcefactory.basic.BasicSourceFactory

A months source delivers all months of the year.

__doc__ = 'A months source delivers all months of the year.\n '
__module__ = 'waeup.kofa.interfaces'
getTitle(value)[source]
getToken(value)[source]
getValues()[source]
exception waeup.kofa.interfaces.NotAnEmailAddress[source]

Bases: zope.schema._bootstrapinterfaces.ValidationError

Invalid email address

__doc__ = u'Invalid email address'
__module__ = 'waeup.kofa.interfaces'
exception waeup.kofa.interfaces.NotHTMLValue[source]

Bases: zope.schema._bootstrapinterfaces.ValidationError

Style or script elements not allowed

__doc__ = u'Style or script elements not allowed'
__module__ = 'waeup.kofa.interfaces'
exception waeup.kofa.interfaces.NotIdValue[source]

Bases: zope.schema._bootstrapinterfaces.ValidationError

Invalid id

__doc__ = u'Invalid id'
__module__ = 'waeup.kofa.interfaces'
class waeup.kofa.interfaces.RoleSource[source]

Bases: zc.sourcefactory.basic.BasicSourceFactory

A source for site roles.

__doc__ = 'A source for site roles.\n '
__module__ = 'waeup.kofa.interfaces'
getTitle(value)[source]
getValues()[source]
waeup.kofa.interfaces.SimpleKofaVocabulary(*terms)[source]

A well-buildt vocabulary provides terms with a value, token and title for each term

class waeup.kofa.interfaces.SubjectSource[source]

Bases: zc.sourcefactory.basic.BasicSourceFactory

A source for school subjects used in exam documentation.

__doc__ = 'A source for school subjects used in exam documentation.\n '
__module__ = 'waeup.kofa.interfaces'
getTitle(value)[source]
getValues()[source]
waeup.kofa.interfaces.academic_sessions()[source]
waeup.kofa.interfaces.check_email()

Regular expression to check email-address formats. As these can become rather complex (nearly everything is allowed by RFCs), we only forbid whitespaces, commas and dots following onto each other.

waeup.kofa.interfaces.check_id()

Regular expressions to check id formats.

waeup.kofa.interfaces.validate_email(value)[source]
waeup.kofa.interfaces.validate_html(value)[source]
waeup.kofa.interfaces.validate_id(value)[source]
waeup.kofa.interfaces.validate_phone(value)[source]
interface waeup.kofa.interfaces.IUniversity[source]

Extends: waeup.kofa.interfaces.IKofaObject

Representation of a university.