Ignore:
Timestamp:
16 Jun 2014, 08:29:22 (11 years ago)
Author:
Henrik Bettermann
Message:

Remove dependencies on kofacustom.nigeria.

Location:
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni
Files:
13 edited
1 moved

Legend:

Unmodified
Added
Removed
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/batching.py

    r10765 r11687  
    2424students, studycourses, payment tickets and accommodation tickets.
    2525"""
    26 from kofacustom.skeleton.students.interfaces import (
     26from kofacustom.sampleuni.students.interfaces import (
    2727    ICustomStudent, ICustomStudentUpdateByRegNo,
    2828    ICustomStudentUpdateByMatricNo,
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/browser.py

    r10765 r11687  
    3232from waeup.kofa.students.interfaces import IStudentsUtils, ICourseTicket
    3333from waeup.kofa.students.workflow import FORBIDDEN_POSTGRAD_TRANS
    34 from kofacustom.nigeria.students.browser import (
    35     NigeriaOnlinePaymentDisplayFormPage,
    36     NigeriaStudentBaseManageFormPage,
    37     NigeriaStudentClearanceEditFormPage,
    38     NigeriaOnlinePaymentAddFormPage,
    39     NigeriaExportPDFPaymentSlipPage,
    40     NigeriaExportPDFClearanceSlipPage,
    41     )
    42 
    43 from kofacustom.skeleton.students.interfaces import (
     34from kofacustom.sampleuni.students.interfaces import (
    4435    ICustomStudentOnlinePayment, ICustomStudentStudyCourse,
    4536    ICustomStudentStudyLevel)
    46 from kofacustom.skeleton.interfaces import MessageFactory as _
     37from kofacustom.sampleuni.interfaces import MessageFactory as _
    4738
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/export.py

    r11545 r11687  
    1818"""Exporters for student related stuff.
    1919"""
    20 from kofacustom.skeleton.students.interfaces import (
     20from kofacustom.sampleuni.students.interfaces import (
    2121    ICustomStudent,
    2222    ICustomStudentStudyCourse,
     
    2424    ICustomCourseTicket,
    2525    ICustomStudentOnlinePayment)
    26 from kofacustom.nigeria.students.export import (
    27     NigeriaStudentsExporter,
    28     NigeriaStudentStudyCourseExporter,
    29     NigeriaStudentStudyLevelExporter,
    30     NigeriaCourseTicketExporter,
    31     NigeriaStudentPaymentsExporter)
     26from waeup.kofa.students.export import (
     27    StudentsExporter,
     28    StudentStudyCourseExporter,
     29    StudentStudyLevelExporter,
     30    CourseTicketExporter,
     31    StudentPaymentsExporter)
    3232from waeup.kofa.utils.helpers import iface_names
    3333
    34 class CustomStudentsExporter(NigeriaStudentsExporter):
     34class CustomStudentsExporter(StudentsExporter):
    3535    """Exporter for Students.
    3636    """
     
    4141        'current_level', 'current_session')
    4242
    43 class CustomStudentStudyCourseExporter(NigeriaStudentStudyCourseExporter):
     43class CustomStudentStudyCourseExporter(StudentStudyCourseExporter):
    4444    """Exporter for StudentStudyCourses.
    4545    """
     
    4848        sorted(iface_names(ICustomStudentStudyCourse))) + ('student_id',)
    4949
    50 class CustomStudentStudyLevelExporter(NigeriaStudentStudyLevelExporter):
     50class CustomStudentStudyLevelExporter(StudentStudyLevelExporter):
    5151    """Exporter for StudentStudyLevels.
    5252    """
     
    5656        'student_id', 'number_of_tickets','certcode')
    5757
    58 class CustomCourseTicketExporter(NigeriaCourseTicketExporter):
     58class CustomCourseTicketExporter(CourseTicketExporter):
    5959    """Exporter for CourseTickets.
    6060    """
     
    6464        'certcode', 'display_fullname')
    6565
    66 class CustomStudentPaymentsExporter(NigeriaStudentPaymentsExporter):
     66class CustomStudentPaymentsExporter(StudentPaymentsExporter):
    6767    """Exporter for OnlinePayment instances.
    6868    """
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/interfaces.py

    r10765 r11687  
    1818
    1919from zope import schema
    20 from kofacustom.nigeria.students.interfaces import (
    21     INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
    22     INigeriaStudentPersonal, INigeriaStudentStudyLevel,
    23     INigeriaStudentStudyCourse, INigeriaCourseTicket,
    24     INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
     20from waeup.kofa.students.interfaces import (
     21    IStudentBase, IUGStudentClearance, IPGStudentClearance,
     22    IStudentPersonal, IStudentStudyLevel,
     23    IStudentStudyCourse, ICourseTicket,
     24    IStudentUpdateByRegNo, IStudentUpdateByMatricNo,
    2525    )
    26 from kofacustom.skeleton.payments.interfaces import ICustomOnlinePayment
    27 from kofacustom.skeleton.interfaces import MessageFactory as _
     26from kofacustom.sampleuni.payments.interfaces import ICustomOnlinePayment
     27from kofacustom.sampleuni.interfaces import MessageFactory as _
    2828
    29 class ICustomStudentBase(INigeriaStudentBase):
     29class ICustomStudentBase(IStudentBase):
    3030    """Representation of student base data.
    3131
    3232    """
    3333
    34 class ICustomStudentPersonal(INigeriaStudentPersonal):
     34class ICustomStudentPersonal(IStudentPersonal):
    3535    """Student personal data.
    3636
    3737    """
    3838
    39 class ICustomUGStudentClearance(INigeriaUGStudentClearance):
     39class ICustomUGStudentClearance(IUGStudentClearance):
    4040    """Representation of ug student clearance data.
    4141
    4242    """
    4343
    44 class ICustomPGStudentClearance(INigeriaPGStudentClearance):
     44class ICustomPGStudentClearance(IPGStudentClearance):
    4545    """Representation of pg student clearance data.
    4646
     
    5454    """
    5555
    56 class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
     56class ICustomStudentStudyCourse(IStudentStudyCourse):
    5757    """A container for student study levels.
    5858
    5959    """
    6060
    61 class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
     61class ICustomStudentStudyLevel(IStudentStudyLevel):
    6262    """A container for course tickets.
    6363
     
    8585    'p_session'].order
    8686
    87 class ICustomCourseTicket(INigeriaCourseTicket):
     87class ICustomCourseTicket(ICourseTicket):
    8888    """A course ticket.
    8989
    9090    """
    9191
    92 class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
     92class ICustomStudentUpdateByRegNo(IStudentUpdateByRegNo):
    9393    """Representation of a student. Skip regular reg_number validation.
    9494
    9595    """
    9696
    97 class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
     97class ICustomStudentUpdateByMatricNo(IStudentUpdateByMatricNo):
    9898    """Representation of a student. Skip regular matric_number validation.
    9999
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/payments.py

    r10765 r11687  
    2626    StudentOnlinePayment, StudentOnlinePaymentFactory)
    2727from waeup.kofa.utils.helpers import attrs_to_fields
    28 from kofacustom.skeleton.students.interfaces import ICustomStudentOnlinePayment
     28from kofacustom.sampleuni.students.interfaces import ICustomStudentOnlinePayment
    2929
    3030class CustomStudentOnlinePayment(StudentOnlinePayment):
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/student.py

    r10765 r11687  
    2525from waeup.kofa.students.interfaces import IStudentNavigation
    2626from waeup.kofa.utils.helpers import get_current_principal
    27 from kofacustom.nigeria.students.student import NigeriaStudent
    28 from kofacustom.skeleton.students.interfaces import ICustomStudent
     27from waeup.kofa.students.student import Student
     28from kofacustom.sampleuni.students.interfaces import ICustomStudent
    2929
    3030
    31 class CustomStudent(NigeriaStudent):
     31class CustomStudent(Student):
    3232    """This is a student container for the various objects
    3333    owned by students.
     
    3939    def transcript_enabled(self):
    4040        user = get_current_principal()
    41         if user.id in ('admin', 'isouaba', 'niyi', 'delejason'):
     41        if user.id in ('admin'):
    4242            return True
    4343        return False
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/studycourse.py

    r10765 r11687  
    2626from waeup.kofa.students.interfaces import IStudentNavigation
    2727from waeup.kofa.students.workflow import CLEARED, RETURNING, PAID
    28 from kofacustom.nigeria.students.studycourse import NigeriaStudentStudyCourse
    29 from kofacustom.skeleton.students.interfaces import ICustomStudentStudyCourse
     28from waeup.kofa.students.studycourse import StudentStudyCourse
     29from kofacustom.sampleuni.students.interfaces import ICustomStudentStudyCourse
    3030
    31 class CustomStudentStudyCourse(NigeriaStudentStudyCourse):
     31class CustomStudentStudyCourse(StudentStudyCourse):
    3232    """This is a container for study levels.
    3333    """
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/studylevel.py

    r10765 r11687  
    2828    CourseTicketFactory, StudentStudyLevelFactory)
    2929from waeup.kofa.students.interfaces import IStudentNavigation
    30 from kofacustom.skeleton.students.interfaces import (
     30from kofacustom.sampleuni.students.interfaces import (
    3131    ICustomStudentStudyLevel, ICustomCourseTicket)
    3232
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/tests/test_browser.py

    r10765 r11687  
    3434    IExtFileStore, IFileStoreNameChooser)
    3535from waeup.kofa.students.interfaces import IStudentsUtils
    36 from kofacustom.skeleton.testing import FunctionalLayer
     36from kofacustom.sampleuni.testing import FunctionalLayer
    3737
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/tests/test_export.py

    r11543 r11687  
    55from waeup.kofa.schoolgrades import ResultEntry
    66from waeup.kofa.students.tests.test_batching import StudentImportExportSetup
    7 from kofacustom.skeleton.utils.utils import CustomKofaUtils
    8 from kofacustom.skeleton.students.export import (
     7from kofacustom.sampleuni.utils.utils import CustomKofaUtils
     8from kofacustom.sampleuni.students.export import (
    99    CustomStudentsExporter, CustomStudentPaymentsExporter)
    10 from kofacustom.skeleton.testing import FunctionalLayer
     10from kofacustom.sampleuni.testing import FunctionalLayer
    1111
    1212
     
    4646        result = open(self.outfile, 'rb').read()
    4747        self.assertMatches(
    48             'adm_code,alr_date,alr_fname,alr_no,alr_results,clearance_locked,'
    49             'clr_code,date_of_birth,def_adm,disabled,email,emp2_end,'
    50             'emp2_position,emp2_reason,emp2_start,emp_end,emp_position,'
    51             'emp_reason,emp_start,employer,employer2,firstname,former_matric,'
    52             'fst_sit_date,fst_sit_fname,fst_sit_no,fst_sit_results,'
    53             'fst_sit_type,hq2_degree,hq2_disc,hq2_matric_no,hq2_school,'
    54             'hq2_session,hq2_type,hq_degree,hq_disc,hq_fname,hq_matric_no,'
    55             'hq_school,hq_session,hq_type,is_staff,lastname,lga,'
    56             'marit_stat,matric_number,middlename,nationality,'
    57             'next_kin_address,next_kin_name,next_kin_phone,next_kin_relation,'
    58             'nysc_lga,nysc_location,nysc_year,officer_comment,'
    59             'perm_address,personal_updated,phone,reg_number,'
    60             'religion,scd_sit_date,scd_sit_fname,scd_sit_no,'
    61             'scd_sit_results,scd_sit_type,sex,student_id,'
    62             'suspended,suspended_comment,password,state,history,certcode,is_postgrad,'
    63             'current_level,current_session\r\nmy adm code,,,,'
    64             '"[(\'visual_art\', \'A1\')]",0,my clr code,1981-02-04#,,,'
    65             'anna@sample.com,,,,,,,,,,,Anna,,,,,"[(\'visual_art\', \'A1\')]"'
    66             ',,,,,,,,,,,,,,,,Tester,,,234,M.,NG,,,,,,,,,'
    67             '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,,,,,'
    68             '"[(\'visual_art\', \'A1\')]",,f,A111111,0,,,created,'
    69             '[u\'2012-11-06 13:16:41 WAT - Record created by system\'],'
     48            'adm_code,clearance_locked,clr_code,date_of_birth,email,'
     49            'employer,firstname,lastname,matric_number,middlename,'
     50            'nationality,officer_comment,perm_address,personal_updated,'
     51            'phone,reg_number,sex,student_id,suspended,suspended_comment,'
     52            'password,state,history,certcode,is_postgrad,current_level,'
     53            'current_session\r\nmy adm code,0,my clr code,1981-02-04#,'
     54            'anna@sample.com,,Anna,Tester,234,M.,NG,,'
     55            '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,'
     56            'f,A111111,0,,,created,'
     57            '[u\'2014-06-16 08:23:55 UTC - Record created by system\'],'
    7058            'CERT1,0,200,2012\r\n',
    7159            result
     
    9987        result = open(self.outfile, 'rb').read()
    10088        self.assertMatches(
    101             'ac,amount_auth,creation_date,gateway_amt,p_category,p_current,'
    102             'p_id,p_item,p_level,p_session,p_state,payment_date,provider_amt,'
    103             'r_amount_approved,r_card_num,r_code,r_company,r_desc,'
    104             'r_pay_reference,thirdparty_amt,student_id,state,'
    105             'current_session\r\n'
    106             '666,12.12,2012-04-01 13:12:01,,schoolfee,1,my-id,p-item,'
    107             '100,2012,paid,2012-04-01 14:12:01,,12.12,'
    108             '789,r-code,interswatch,,,,A111111,created,2012\r\n',
     89            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
     90            'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
     91            'r_code,r_desc,student_id,state,current_session\r\n666,'
     92            '12.12,2012-04-01 13:12:01,schoolfee,1,my-id,p-item,'
     93            '100,2012,paid,2012-04-01 14:12:01,12.12,r-code,,'
     94            'A111111,created,2012\r\n',
    10995            result
    11096            )
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/tests/test_student.py

    r10765 r11687  
    2222from zope.interface import verify
    2323from waeup.kofa.testing import FunctionalTestCase
    24 from kofacustom.skeleton.students.student import CustomStudent, CustomStudentFactory
    25 from kofacustom.skeleton.students.studycourse import (
     24from kofacustom.sampleuni.students.student import CustomStudent, CustomStudentFactory
     25from kofacustom.sampleuni.students.studycourse import (
    2626    CustomStudentStudyCourse, CustomStudentStudyCourseFactory)
    27 from kofacustom.skeleton.students.studylevel import (
     27from kofacustom.sampleuni.students.studylevel import (
    2828    CustomStudentStudyLevel, CustomCourseTicket,
    2929    CustomStudentStudyLevelFactory,
    3030    CustomCourseTicketFactory)
    31 from kofacustom.skeleton.students.interfaces import (
     31from kofacustom.sampleuni.students.interfaces import (
    3232    ICustomStudent, ICustomStudentStudyCourse,
    3333    ICustomStudentStudyLevel, ICustomCourseTicket)
    34 from kofacustom.skeleton.testing import FunctionalLayer
     34from kofacustom.sampleuni.testing import FunctionalLayer
    3535
    3636
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/utils.py

    r10765 r11687  
    2020from waeup.kofa.interfaces import (IKofaUtils,
    2121    CLEARED, RETURNING, PAID, REGISTERED, VALIDATED)
    22 from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
    23 from kofacustom.skeleton.interfaces import MessageFactory as _
     22from waeup.kofa.students.utils import StudentsUtils
     23from kofacustom.sampleuni.interfaces import MessageFactory as _
    2424
    25 class CustomStudentsUtils(NigeriaStudentsUtils):
     25class CustomStudentsUtils(StudentsUtils):
    2626    """A collection of customized methods.
    2727
  • main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/viewlets.py

    r10765 r11687  
    2020from waeup.kofa.interfaces import REQUESTED
    2121from waeup.kofa.browser.viewlets import ManageActionButton
    22 from kofacustom.skeleton.students.interfaces import (
     22from kofacustom.sampleuni.students.interfaces import (
    2323    ICustomStudentStudyCourse, ICustomStudentStudyLevel)
    2424from waeup.kofa.students.viewlets import (
     
    2828    StudyLevelDisplayFormPage)
    2929
    30 from kofacustom.nigeria.interfaces import MessageFactory as _
     30from waeup.kofa.interfaces import MessageFactory as _
Note: See TracChangeset for help on using the changeset viewer.