university – University Components Package

(see also: Submodules)

class waeup.kofa.university.Course(title=u'Unnamed Course', code=u'NA', credits=0, passmark=40, semester=1, former_course=False, **kw)[source]

A university course.

__doc__ = 'A university course.\n '
__implemented__ = <implementedBy waeup.kofa.university.course.Course>
__init__(title=u'Unnamed Course', code=u'NA', credits=0, passmark=40, semester=1, former_course=False, **kw)[source]
__module__ = 'waeup.kofa.university.course'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
local_roles = ['waeup.local.Lecturer']
longtitle
traverse(name)[source]

Deliver appropriate containers.

class waeup.kofa.university.CoursesContainer[source]

See interfaces for description.

__doc__ = 'See interfaces for description.\n '
__implemented__ = <implementedBy waeup.kofa.university.coursescontainer.CoursesContainer>
__module__ = 'waeup.kofa.university.coursescontainer'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__setitem__(name, course)[source]

See corresponding docstring in certificatescontainer.py.

addCourse(course)[source]

See corresponding docstring in certificatescontainer.py.

clear()[source]

See corresponding docstring and comments in certificatescontainer.py.

class waeup.kofa.university.Certificate(code=u'NA', title=u'Unnamed Certificate', study_mode=None, start_level=None, end_level=None, application_category=None, school_fee_1=None, school_fee_2=None, school_fee_3=None, school_fee_4=None, ratio=None, degree=None, custom_textline_1=None, custom_textline_2=None, custom_float_1=None, custom_float_2=None)[source]

A certificate.

__doc__ = 'A certificate.\n '
__implemented__ = <implementedBy waeup.kofa.university.certificate.Certificate>
__init__(code=u'NA', title=u'Unnamed Certificate', study_mode=None, start_level=None, end_level=None, application_category=None, school_fee_1=None, school_fee_2=None, school_fee_3=None, school_fee_4=None, ratio=None, degree=None, custom_textline_1=None, custom_textline_2=None, custom_float_1=None, custom_float_2=None)[source]
__module__ = 'waeup.kofa.university.certificate'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
addCertCourse(course, level=100, mandatory=True, course_category=None)[source]

Add a certificate course.

delCertCourses(code, level=None)[source]

Delete certificate courses.

We might have more than one certificate course for a course. If level is not provided all certificate courses referring to the same course will be deleted.

local_roles = ['waeup.local.CourseAdviser100', 'waeup.local.CourseAdviser200', 'waeup.local.CourseAdviser300', 'waeup.local.CourseAdviser400', 'waeup.local.CourseAdviser500', 'waeup.local.CourseAdviser600', 'waeup.local.CourseAdviser700', 'waeup.local.CourseAdviser800', 'waeup.local.DepartmentOfficer', 'waeup.local.ClearanceOfficer']
longtitle
moveCertificate(facname, depname, newcode)[source]
traverse(name)[source]

Deliver appropriate containers.

class waeup.kofa.university.CertificatesContainer[source]

A storage for certificates.

A CertificatesContainer stores waeup.kofa.university.Certificate instances.

It is a grok.Container basically acting like a standard Python dictionary. That means you can add certificates like items in a normal dictionary and also get certificates by using values(), keys(), and items().

This container type is picky about its contents: only real certificates can be stored here and each new certificate must provide a unique code. See addCertificate() for details.

Each CertificatesContainer provides ICertificatesContainer.

__doc__ = 'A storage for certificates.\n\n A :class:`CertificatesContainer` stores\n :class:`waeup.kofa.university.Certificate` instances.\n\n It is a :class:`grok.Container` basically acting like a standard\n Python dictionary. That means you can add certificates like items\n in a normal dictionary and also get certificates by using\n :meth:`values`, :meth:`keys`, and :meth:`items`.\n\n This container type is picky about its contents: only real\n certificates can be stored here and each new certificate must\n provide a unique `code`. See :meth:`addCertificate` for details.\n\n Each :class:`CertificatesContainer` provides\n :class:`ICertificatesContainer`.\n '
__implemented__ = <implementedBy waeup.kofa.university.certificatescontainer.CertificatesContainer>
__module__ = 'waeup.kofa.university.certificatescontainer'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
__setitem__(name, certificate)[source]

Insert certificate with name as key into container.

The certificate must be an object implementing waeup.kofa.university.interfaces.ICertificate. If not, a TypeError is raised.

If the certificate code does not equal name a ValueError is raised.

If the code attribute of certificate is already in use by another certificate stored in the local site (waeup.kofa.app.University instance), then a waeup.kofa.interfaces.DuplicationError will be raised.

If name is already used as a key, a KeyError will be raised.

addCertificate(certificate)[source]

Add certificate to the container.

The certificate must be an object implementing waeup.kofa.university.interfaces.ICertificate. If not, a TypeError is raised.

The certificate will be stored in the container with its code attribute as key. If this key is already used for another certificate stored in the local site (waeup.kofa.app.University instance), then a waeup.kofa.interfaces.DuplicationError will be raised.

clear()[source]

Remove all contents from the certificate container.

This methods is pretty fast and optimized. Use it instead of removing all items manually yourself.

class waeup.kofa.university.Faculty(title=u'Unnamed Faculty', title_prefix=u'faculty', code=u'NA', officer_1=None, officer_2=None, **kw)[source]

A university faculty.

__doc__ = 'A university faculty.\n '
__implemented__ = <implementedBy waeup.kofa.university.faculty.Faculty>
__init__(title=u'Unnamed Faculty', title_prefix=u'faculty', code=u'NA', officer_1=None, officer_2=None, **kw)[source]
__module__ = 'waeup.kofa.university.faculty'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
addDepartment(department)[source]

Add a department to the faculty.

local_roles = ['waeup.local.DepartmentOfficer', 'waeup.local.DepartmentManager', 'waeup.local.ClearanceOfficer', 'waeup.local.UGClearanceOfficer', 'waeup.local.PGClearanceOfficer', 'waeup.local.CourseAdviser100', 'waeup.local.CourseAdviser200', 'waeup.local.CourseAdviser300', 'waeup.local.CourseAdviser400', 'waeup.local.CourseAdviser500', 'waeup.local.CourseAdviser600', 'waeup.local.CourseAdviser700', 'waeup.local.CourseAdviser800', 'waeup.local.LocalStudentsManager', 'waeup.local.LocalWorkflowManager']
longtitle
traverse(name)[source]

Deliver appropriate containers.

class waeup.kofa.university.FacultiesContainer[source]

See interfaces for description.

__doc__ = 'See interfaces for description.\n '
__implemented__ = <implementedBy waeup.kofa.university.facultiescontainer.FacultiesContainer>
__module__ = 'waeup.kofa.university.facultiescontainer'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
addFaculty(faculty)[source]
traverse(name)[source]
class waeup.kofa.university.Department(title=u'Unnamed Department', title_prefix=u'department', code=u'NA', officer_1=None, officer_2=None, officer_3=None, officer_4=None, **kw)[source]

A university department.

__doc__ = 'A university department.\n '
__implemented__ = <implementedBy waeup.kofa.university.department.Department>
__init__(title=u'Unnamed Department', title_prefix=u'department', code=u'NA', officer_1=None, officer_2=None, officer_3=None, officer_4=None, **kw)[source]
__module__ = 'waeup.kofa.university.department'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
local_roles = ['waeup.local.ApplicationsManager', 'waeup.local.DepartmentOfficer', 'waeup.local.DepartmentManager', 'waeup.local.ClearanceOfficer', 'waeup.local.UGClearanceOfficer', 'waeup.local.PGClearanceOfficer', 'waeup.local.CourseAdviser100', 'waeup.local.CourseAdviser200', 'waeup.local.CourseAdviser300', 'waeup.local.CourseAdviser400', 'waeup.local.CourseAdviser500', 'waeup.local.CourseAdviser600', 'waeup.local.CourseAdviser700', 'waeup.local.CourseAdviser800', 'waeup.local.LocalStudentsManager']
longtitle
moveDepartment(facname, depname)[source]

Move department to new department named depname in faculty named facname.

traverse(name)[source]

Deliver appropriate containers, if someone wants to go to courses, certificates or exports.