- Timestamp:
- 16 Jun 2014, 08:29:22 (11 years ago)
- 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 24 24 students, studycourses, payment tickets and accommodation tickets. 25 25 """ 26 from kofacustom.s keleton.students.interfaces import (26 from kofacustom.sampleuni.students.interfaces import ( 27 27 ICustomStudent, ICustomStudentUpdateByRegNo, 28 28 ICustomStudentUpdateByMatricNo, -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/browser.py
r10765 r11687 32 32 from waeup.kofa.students.interfaces import IStudentsUtils, ICourseTicket 33 33 from 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 ( 34 from kofacustom.sampleuni.students.interfaces import ( 44 35 ICustomStudentOnlinePayment, ICustomStudentStudyCourse, 45 36 ICustomStudentStudyLevel) 46 from kofacustom.s keleton.interfaces import MessageFactory as _37 from kofacustom.sampleuni.interfaces import MessageFactory as _ 47 38 -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/export.py
r11545 r11687 18 18 """Exporters for student related stuff. 19 19 """ 20 from kofacustom.s keleton.students.interfaces import (20 from kofacustom.sampleuni.students.interfaces import ( 21 21 ICustomStudent, 22 22 ICustomStudentStudyCourse, … … 24 24 ICustomCourseTicket, 25 25 ICustomStudentOnlinePayment) 26 from kofacustom.nigeria.students.export import (27 NigeriaStudentsExporter,28 NigeriaStudentStudyCourseExporter,29 NigeriaStudentStudyLevelExporter,30 NigeriaCourseTicketExporter,31 NigeriaStudentPaymentsExporter)26 from waeup.kofa.students.export import ( 27 StudentsExporter, 28 StudentStudyCourseExporter, 29 StudentStudyLevelExporter, 30 CourseTicketExporter, 31 StudentPaymentsExporter) 32 32 from waeup.kofa.utils.helpers import iface_names 33 33 34 class CustomStudentsExporter( NigeriaStudentsExporter):34 class CustomStudentsExporter(StudentsExporter): 35 35 """Exporter for Students. 36 36 """ … … 41 41 'current_level', 'current_session') 42 42 43 class CustomStudentStudyCourseExporter( NigeriaStudentStudyCourseExporter):43 class CustomStudentStudyCourseExporter(StudentStudyCourseExporter): 44 44 """Exporter for StudentStudyCourses. 45 45 """ … … 48 48 sorted(iface_names(ICustomStudentStudyCourse))) + ('student_id',) 49 49 50 class CustomStudentStudyLevelExporter( NigeriaStudentStudyLevelExporter):50 class CustomStudentStudyLevelExporter(StudentStudyLevelExporter): 51 51 """Exporter for StudentStudyLevels. 52 52 """ … … 56 56 'student_id', 'number_of_tickets','certcode') 57 57 58 class CustomCourseTicketExporter( NigeriaCourseTicketExporter):58 class CustomCourseTicketExporter(CourseTicketExporter): 59 59 """Exporter for CourseTickets. 60 60 """ … … 64 64 'certcode', 'display_fullname') 65 65 66 class CustomStudentPaymentsExporter( NigeriaStudentPaymentsExporter):66 class CustomStudentPaymentsExporter(StudentPaymentsExporter): 67 67 """Exporter for OnlinePayment instances. 68 68 """ -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/interfaces.py
r10765 r11687 18 18 19 19 from zope import schema 20 from kofacustom.nigeria.students.interfaces import (21 I NigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,22 I NigeriaStudentPersonal, INigeriaStudentStudyLevel,23 I NigeriaStudentStudyCourse, INigeriaCourseTicket,24 I NigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,20 from waeup.kofa.students.interfaces import ( 21 IStudentBase, IUGStudentClearance, IPGStudentClearance, 22 IStudentPersonal, IStudentStudyLevel, 23 IStudentStudyCourse, ICourseTicket, 24 IStudentUpdateByRegNo, IStudentUpdateByMatricNo, 25 25 ) 26 from kofacustom.s keleton.payments.interfaces import ICustomOnlinePayment27 from kofacustom.s keleton.interfaces import MessageFactory as _26 from kofacustom.sampleuni.payments.interfaces import ICustomOnlinePayment 27 from kofacustom.sampleuni.interfaces import MessageFactory as _ 28 28 29 class ICustomStudentBase(I NigeriaStudentBase):29 class ICustomStudentBase(IStudentBase): 30 30 """Representation of student base data. 31 31 32 32 """ 33 33 34 class ICustomStudentPersonal(I NigeriaStudentPersonal):34 class ICustomStudentPersonal(IStudentPersonal): 35 35 """Student personal data. 36 36 37 37 """ 38 38 39 class ICustomUGStudentClearance(I NigeriaUGStudentClearance):39 class ICustomUGStudentClearance(IUGStudentClearance): 40 40 """Representation of ug student clearance data. 41 41 42 42 """ 43 43 44 class ICustomPGStudentClearance(I NigeriaPGStudentClearance):44 class ICustomPGStudentClearance(IPGStudentClearance): 45 45 """Representation of pg student clearance data. 46 46 … … 54 54 """ 55 55 56 class ICustomStudentStudyCourse(I NigeriaStudentStudyCourse):56 class ICustomStudentStudyCourse(IStudentStudyCourse): 57 57 """A container for student study levels. 58 58 59 59 """ 60 60 61 class ICustomStudentStudyLevel(I NigeriaStudentStudyLevel):61 class ICustomStudentStudyLevel(IStudentStudyLevel): 62 62 """A container for course tickets. 63 63 … … 85 85 'p_session'].order 86 86 87 class ICustomCourseTicket(I NigeriaCourseTicket):87 class ICustomCourseTicket(ICourseTicket): 88 88 """A course ticket. 89 89 90 90 """ 91 91 92 class ICustomStudentUpdateByRegNo(I NigeriaStudentUpdateByRegNo):92 class ICustomStudentUpdateByRegNo(IStudentUpdateByRegNo): 93 93 """Representation of a student. Skip regular reg_number validation. 94 94 95 95 """ 96 96 97 class ICustomStudentUpdateByMatricNo(I NigeriaStudentUpdateByMatricNo):97 class ICustomStudentUpdateByMatricNo(IStudentUpdateByMatricNo): 98 98 """Representation of a student. Skip regular matric_number validation. 99 99 -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/payments.py
r10765 r11687 26 26 StudentOnlinePayment, StudentOnlinePaymentFactory) 27 27 from waeup.kofa.utils.helpers import attrs_to_fields 28 from kofacustom.s keleton.students.interfaces import ICustomStudentOnlinePayment28 from kofacustom.sampleuni.students.interfaces import ICustomStudentOnlinePayment 29 29 30 30 class CustomStudentOnlinePayment(StudentOnlinePayment): -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/student.py
r10765 r11687 25 25 from waeup.kofa.students.interfaces import IStudentNavigation 26 26 from waeup.kofa.utils.helpers import get_current_principal 27 from kofacustom.nigeria.students.student import NigeriaStudent28 from kofacustom.s keleton.students.interfaces import ICustomStudent27 from waeup.kofa.students.student import Student 28 from kofacustom.sampleuni.students.interfaces import ICustomStudent 29 29 30 30 31 class CustomStudent( NigeriaStudent):31 class CustomStudent(Student): 32 32 """This is a student container for the various objects 33 33 owned by students. … … 39 39 def transcript_enabled(self): 40 40 user = get_current_principal() 41 if user.id in ('admin' , 'isouaba', 'niyi', 'delejason'):41 if user.id in ('admin'): 42 42 return True 43 43 return False -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/studycourse.py
r10765 r11687 26 26 from waeup.kofa.students.interfaces import IStudentNavigation 27 27 from waeup.kofa.students.workflow import CLEARED, RETURNING, PAID 28 from kofacustom.nigeria.students.studycourse import NigeriaStudentStudyCourse29 from kofacustom.s keleton.students.interfaces import ICustomStudentStudyCourse28 from waeup.kofa.students.studycourse import StudentStudyCourse 29 from kofacustom.sampleuni.students.interfaces import ICustomStudentStudyCourse 30 30 31 class CustomStudentStudyCourse( NigeriaStudentStudyCourse):31 class CustomStudentStudyCourse(StudentStudyCourse): 32 32 """This is a container for study levels. 33 33 """ -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/studylevel.py
r10765 r11687 28 28 CourseTicketFactory, StudentStudyLevelFactory) 29 29 from waeup.kofa.students.interfaces import IStudentNavigation 30 from kofacustom.s keleton.students.interfaces import (30 from kofacustom.sampleuni.students.interfaces import ( 31 31 ICustomStudentStudyLevel, ICustomCourseTicket) 32 32 -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/tests/test_browser.py
r10765 r11687 34 34 IExtFileStore, IFileStoreNameChooser) 35 35 from waeup.kofa.students.interfaces import IStudentsUtils 36 from kofacustom.s keleton.testing import FunctionalLayer36 from kofacustom.sampleuni.testing import FunctionalLayer 37 37 -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/tests/test_export.py
r11543 r11687 5 5 from waeup.kofa.schoolgrades import ResultEntry 6 6 from waeup.kofa.students.tests.test_batching import StudentImportExportSetup 7 from kofacustom.s keleton.utils.utils import CustomKofaUtils8 from kofacustom.s keleton.students.export import (7 from kofacustom.sampleuni.utils.utils import CustomKofaUtils 8 from kofacustom.sampleuni.students.export import ( 9 9 CustomStudentsExporter, CustomStudentPaymentsExporter) 10 from kofacustom.s keleton.testing import FunctionalLayer10 from kofacustom.sampleuni.testing import FunctionalLayer 11 11 12 12 … … 46 46 result = open(self.outfile, 'rb').read() 47 47 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\'],' 70 58 'CERT1,0,200,2012\r\n', 71 59 result … … 99 87 result = open(self.outfile, 'rb').read() 100 88 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', 109 95 result 110 96 ) -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/tests/test_student.py
r10765 r11687 22 22 from zope.interface import verify 23 23 from waeup.kofa.testing import FunctionalTestCase 24 from kofacustom.s keleton.students.student import CustomStudent, CustomStudentFactory25 from kofacustom.s keleton.students.studycourse import (24 from kofacustom.sampleuni.students.student import CustomStudent, CustomStudentFactory 25 from kofacustom.sampleuni.students.studycourse import ( 26 26 CustomStudentStudyCourse, CustomStudentStudyCourseFactory) 27 from kofacustom.s keleton.students.studylevel import (27 from kofacustom.sampleuni.students.studylevel import ( 28 28 CustomStudentStudyLevel, CustomCourseTicket, 29 29 CustomStudentStudyLevelFactory, 30 30 CustomCourseTicketFactory) 31 from kofacustom.s keleton.students.interfaces import (31 from kofacustom.sampleuni.students.interfaces import ( 32 32 ICustomStudent, ICustomStudentStudyCourse, 33 33 ICustomStudentStudyLevel, ICustomCourseTicket) 34 from kofacustom.s keleton.testing import FunctionalLayer34 from kofacustom.sampleuni.testing import FunctionalLayer 35 35 36 36 -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/utils.py
r10765 r11687 20 20 from waeup.kofa.interfaces import (IKofaUtils, 21 21 CLEARED, RETURNING, PAID, REGISTERED, VALIDATED) 22 from kofacustom.nigeria.students.utils import NigeriaStudentsUtils23 from kofacustom.s keleton.interfaces import MessageFactory as _22 from waeup.kofa.students.utils import StudentsUtils 23 from kofacustom.sampleuni.interfaces import MessageFactory as _ 24 24 25 class CustomStudentsUtils( NigeriaStudentsUtils):25 class CustomStudentsUtils(StudentsUtils): 26 26 """A collection of customized methods. 27 27 -
main/kofacustom.sampleuni/trunk/src/kofacustom/sampleuni/students/viewlets.py
r10765 r11687 20 20 from waeup.kofa.interfaces import REQUESTED 21 21 from waeup.kofa.browser.viewlets import ManageActionButton 22 from kofacustom.s keleton.students.interfaces import (22 from kofacustom.sampleuni.students.interfaces import ( 23 23 ICustomStudentStudyCourse, ICustomStudentStudyLevel) 24 24 from waeup.kofa.students.viewlets import ( … … 28 28 StudyLevelDisplayFormPage) 29 29 30 from kofacustom.nigeria.interfaces import MessageFactory as _30 from waeup.kofa.interfaces import MessageFactory as _
Note: See TracChangeset for help on using the changeset viewer.