Changeset 12234 for main/kofacustom.pcn/trunk
- Timestamp:
- 14 Dec 2014, 21:48:41 (10 years ago)
- Location:
- main/kofacustom.pcn/trunk/src/kofacustom/pcn
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.pcn/trunk/src/kofacustom/pcn/applicants/export.py
r11832 r12234 20 20 import grok 21 21 from waeup.kofa.applicants.interfaces import IApplicantBaseData 22 from waeup.kofa.applicants.export import Applicant sExporter22 from waeup.kofa.applicants.export import ApplicantExporter 23 23 from kofacustom.pcn.applicants.interfaces import ICustomApplicant 24 24 25 class CustomApplicant sExporter(ApplicantsExporter):25 class CustomApplicantExporter(ApplicantExporter): 26 26 """Exporter for Custom Applicants. 27 27 """ -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/applicants/interfaces.py
r11843 r12234 51 51 state, depending on use-case. 52 52 """ 53 54 def writeLogMessage(view, comment):55 """Adds an INFO message to the log file56 """57 58 def createStudent():59 """Create a student object from applicatnt data60 and copy applicant object.61 """62 53 63 54 history = Attribute('Object history, a list of messages') -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/applicants/tests/test_browser.py
r11832 r12234 29 29 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup 30 30 from waeup.kofa.applicants.tests.test_batching import ApplicantImportExportSetup 31 from kofacustom.pcn.applicants.export import CustomApplicant sExporter31 from kofacustom.pcn.applicants.export import CustomApplicantExporter 32 32 from kofacustom.pcn.applicants.batching import CustomApplicantProcessor 33 33 … … 37 37 layer = FunctionalLayer 38 38 39 class Applicant sExporterTest(ApplicantImportExportSetup):39 class ApplicantExporterTest(ApplicantImportExportSetup): 40 40 41 41 layer = FunctionalLayer 42 42 43 43 def setUp(self): 44 super(Applicant sExporterTest, self).setUp()44 super(ApplicantExporterTest, self).setUp() 45 45 self.outfile = os.path.join(self.workdir, 'myoutput.csv') 46 46 self.cat = getUtility(ICatalog, name='applicants_catalog') … … 76 76 # set values we can expect in export file 77 77 self.applicant = self.setup_applicant(self.applicant) 78 exporter = CustomApplicant sExporter()78 exporter = CustomApplicantExporter() 79 79 exporter.export_all(self.app, self.outfile) 80 80 result = open(self.outfile, 'rb').read() … … 110 110 num_succ, num_fail, finished_path, failed_path = result 111 111 #content = open(failed_path).read() 112 112 113 self.assertEqual(num_succ,1) 113 114 self.assertEqual(num_fail,0) -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/browser/pages.py
r11894 r12234 28 28 ICustomSessionConfiguration, ICustomSessionConfigurationAdd) 29 29 30 from kofacustom.pcn.university.faculty import I Department, IFaculty30 from kofacustom.pcn.university.faculty import ICustomDepartment, ICustomFaculty 31 31 32 32 grok.templatedir('templates') … … 46 46 """ Page form to add a new faculty to a faculty container. 47 47 """ 48 form_fields = grok.AutoFields(I Faculty)48 form_fields = grok.AutoFields(ICustomFaculty) 49 49 50 50 class FacultyManageFormPage(FacultyManageFormPage): 51 51 """Manage the basic properties of a `Faculty` instance. 52 52 """ 53 form_fields = grok.AutoFields(I Faculty).omit('code')53 form_fields = grok.AutoFields(ICustomFaculty).omit('code') 54 54 55 55 class DepartmentPage(DepartmentPage): … … 61 61 """ 62 62 grok.template('departmentmanagepage') 63 form_fields = grok.AutoFields(I Department).omit(63 form_fields = grok.AutoFields(ICustomDepartment).omit( 64 64 'code', 'score_editing_disabled') 65 65 … … 67 67 """Department index page. 68 68 """ 69 form_fields = grok.AutoFields(I Department).omit('score_editing_disabled')69 form_fields = grok.AutoFields(ICustomDepartment).omit('score_editing_disabled') 70 70 71 71 class CertificatePage(CertificatePage): -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/locales/en/LC_MESSAGES/waeup.kofa.po
r11895 r12234 326 326 msgid "Integer used for constructing the next matriculation number" 327 327 msgstr " " 328 329 msgid "First Choice" 330 msgstr "Desired License" -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/students/export.py
r11832 r12234 25 25 ICustomStudentOnlinePayment) 26 26 from waeup.kofa.students.export import ( 27 Student sExporter,27 StudentExporter, 28 28 StudentStudyCourseExporter, 29 29 StudentStudyLevelExporter, … … 32 32 from waeup.kofa.utils.helpers import iface_names 33 33 34 class CustomStudent sExporter(StudentsExporter):34 class CustomStudentExporter(StudentExporter): 35 35 """Exporter for Students. 36 36 """ -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/students/tests/test_export.py
r11832 r12234 7 7 from kofacustom.pcn.utils.utils import CustomKofaUtils 8 8 from kofacustom.pcn.students.export import ( 9 CustomStudent sExporter, CustomStudentPaymentsExporter)9 CustomStudentExporter, CustomStudentPaymentsExporter) 10 10 from kofacustom.pcn.testing import FunctionalLayer 11 11 12 12 13 class CustomStudent sExporterTest(StudentImportExportSetup):13 class CustomStudentExporterTest(StudentImportExportSetup): 14 14 15 15 layer = FunctionalLayer 16 16 17 17 def setUp(self): 18 super(CustomStudent sExporterTest, self).setUp()18 super(CustomStudentExporterTest, self).setUp() 19 19 self.setup_for_export() 20 20 result_entry = ResultEntry( … … 32 32 def test_ifaces(self): 33 33 # make sure we fullfill interface contracts 34 obj = CustomStudent sExporter()34 obj = CustomStudentExporter() 35 35 verifyObject(ICSVExporter, obj) 36 verifyClass(ICSVExporter, CustomStudent sExporter)36 verifyClass(ICSVExporter, CustomStudentExporter) 37 37 return 38 38 … … 42 42 # set values we can expect in export file 43 43 self.setup_student(self.student) 44 exporter = CustomStudent sExporter()44 exporter = CustomStudentExporter() 45 45 exporter.export_all(self.app, self.outfile) 46 46 result = open(self.outfile, 'rb').read() … … 90 90 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 91 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,,'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 94 'A111111,created,2012\r\n', 95 95 result -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/university/batching.py
r11840 r12234 1 1 from waeup.kofa.university.batching import FacultyProcessor 2 from kofacustom.pcn.university.faculty import I Faculty2 from kofacustom.pcn.university.faculty import ICustomFaculty 3 3 4 4 class FacultyProcessor(FacultyProcessor): 5 5 """A batch processor for IFaculty objects. 6 6 """ 7 iface = I Faculty7 iface = ICustomFaculty -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/university/faculty.py
r11841 r12234 24 24 25 25 26 class I Faculty(IKofaContainer):26 class ICustomFaculty(IKofaContainer): 27 27 """Representation of a university faculty. 28 28 """ … … 61 61 """A university faculty. 62 62 """ 63 grok.implements(I Faculty)63 grok.implements(ICustomFaculty) 64 64 65 65 local_roles = [ … … 91 91 return implementedBy(CustomFaculty) 92 92 93 class I Department(IKofaObject):93 class ICustomDepartment(IKofaObject): 94 94 """Representation of a department. 95 95 """ … … 126 126 certificates = Attribute("A container for certificates.") 127 127 128 128 129 class CustomDepartment(Department): 129 130 """A university department. 130 131 """ 131 grok.implements(I Department)132 grok.implements(ICustomDepartment) 132 133 133 134 local_roles = [ -
main/kofacustom.pcn/trunk/src/kofacustom/pcn/utils/utils.py
r11844 r12234 31 31 STUDY_MODES_DICT = { 32 32 'na': 'not applicable', 33 'ug_ft': 'not applicable', 33 34 } 34 35 … … 40 41 'pmrp': 'Pharmaceutical and Medical Representative Permit', 41 42 'sop': 'Scientific Office Permit', 43 'basic': 'Not applicable', 42 44 } 43 45 44 46 PAYMENT_CATEGORIES = { 45 47 'application': 'Registration Fee', 48 'schoolfee': 'Not applicable', 46 49 } 47 50
Note: See TracChangeset for help on using the changeset viewer.