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/students
Files:
48 edited

Legend:

Unmodified
Added
Removed
  • 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):
Note: See TracChangeset for help on using the changeset viewer.