Changeset 15047 for main/waeup.kofa/trunk
- Timestamp:
- 12 Jun 2018, 06:19:37 (6 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r15042 r15047 4 4 1.6.1.dev0 (unreleased) 5 5 ======================= 6 7 * Rename `StudentPaymentsOverviewExporter`. 6 8 7 9 * Fix `CourseTicketExporter`. Ticket level and session filter -
main/waeup.kofa/trunk/docs/source/userdocs/datacenter/export.rst
r14780 r15047 256 256 postprocessing by the university. 257 257 258 Data ForBursary Exporter259 ----------------------- 258 Data For Bursary Exporter 259 ------------------------- 260 260 261 261 .. autoclass:: waeup.kofa.students.export.DataForBursaryExporter() … … 265 265 .. automethod:: waeup.kofa.students.export.DataForBursaryExporter.mangle_value() 266 266 267 S tudentPayments Overview Exporter268 ---------------------------------- 269 270 .. autoclass:: waeup.kofa.students.export.S tudentPaymentsOverviewExporter()271 272 .. autoattribute:: waeup.kofa.students.export.S tudentPaymentsOverviewExporter.fields273 .. autoattribute:: waeup.kofa.students.export.S tudentPaymentsOverviewExporter.title274 .. autoattribute:: waeup.kofa.students.export.S tudentPaymentsOverviewExporter.curr_year275 .. automethod:: waeup.kofa.students.export.S tudentPaymentsOverviewExporter.mangle_value()267 School Fee Payments Overview Exporter 268 ------------------------------------- 269 270 .. autoclass:: waeup.kofa.students.export.SchoolFeePaymentsOverviewExporter() 271 272 .. autoattribute:: waeup.kofa.students.export.SchoolFeePaymentsOverviewExporter.fields 273 .. autoattribute:: waeup.kofa.students.export.SchoolFeePaymentsOverviewExporter.title 274 .. autoattribute:: waeup.kofa.students.export.SchoolFeePaymentsOverviewExporter.curr_year 275 .. automethod:: waeup.kofa.students.export.SchoolFeePaymentsOverviewExporter.mangle_value() 276 276 277 277 Student Study Levels Overview Exporter … … 292 292 .. autoattribute:: waeup.kofa.students.export.ComboCardDataExporter.title 293 293 .. automethod:: waeup.kofa.students.export.ComboCardDataExporter.mangle_value() 294 295 Data For Lecturer Exporter 296 -------------------------- 297 298 .. autoclass:: waeup.kofa.students.export.DataForLecturerExporter() 299 300 .. autoattribute:: waeup.kofa.students.export.DataForLecturerExporter.fields 301 .. autoattribute:: waeup.kofa.students.export.DataForLecturerExporter.title 302 .. automethod:: waeup.kofa.students.export.DataForLecturerExporter.mangle_value() 294 303 295 304 File Export -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r15042 r15047 3409 3409 exporters += [('Bursary Data', 'bursary')] 3410 3410 if checkPermission('waeup.exportPaymentsOverview', self.context): 3411 exporters += [('Student Payments Overview', ' paymentsoverview')]3411 exporters += [('Student Payments Overview', 'sfpaymentsoverview')] 3412 3412 self.exporters = exporters 3413 3413 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r15043 r15047 461 461 462 462 class DataForBursaryExporter(StudentPaymentExporter): 463 """The DataForBursary Exporter works just like the Student Payment sExporter463 """The DataForBursary Exporter works just like the Student Payment Exporter 464 464 but it exports much more information about the student. It combines 465 465 payment and student data in one table in order to spare postprocessing of … … 534 534 value, name, context=context) 535 535 536 class S tudentPaymentsOverviewExporter(StudentExporter):537 """The S tudentPayments Overview Exporter first filters the set of students536 class SchoolFeePaymentsOverviewExporter(StudentExporter): 537 """The School Fee Payments Overview Exporter first filters the set of students 538 538 by searching the students catalog. Then it exports some student base data 539 539 together with the total school fee amount paid in each year over a 540 540 predefined year range (current year - 9, ... , current year + 1). 541 541 """ 542 grok.name(' paymentsoverview')542 grok.name('sfpaymentsoverview') 543 543 544 544 curr_year = datetime.now().year … … 551 551 'entry_session', 'reg_number' 552 552 ) + year_range_tuple 553 title = _(u'Student Payments Overview')553 title = _(u'Student School Fee Payments Overview') 554 554 555 555 def mangle_value(self, value, name, context=None): -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r15042 r15047 3935 3935 self.browser.getLink("Export student data").click() 3936 3936 self.browser.getControl("Configure new export").click() 3937 # Only the paymentsoverview exporter is available for department officers3937 # Only the sfpaymentsoverview exporter is available for department officers 3938 3938 self.assertFalse('<option value="students">' in self.browser.contents) 3939 3939 self.assertTrue( 3940 '<option value=" paymentsoverview">' in self.browser.contents)3941 self.browser.getControl(name="exporter").value = [' paymentsoverview']3940 '<option value="sfpaymentsoverview">' in self.browser.contents) 3941 self.browser.getControl(name="exporter").value = ['sfpaymentsoverview'] 3942 3942 self.browser.getControl(name="session").value = ['2004'] 3943 3943 self.browser.getControl(name="level").value = ['100'] -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r14984 r15047 30 30 StudentExporter, StudentStudyCourseExporter, StudentStudyLevelExporter, 31 31 CourseTicketExporter, StudentPaymentExporter, BedTicketExporter, 32 S tudentPaymentsOverviewExporter, StudentStudyLevelsOverviewExporter,32 SchoolFeePaymentsOverviewExporter, StudentStudyLevelsOverviewExporter, 33 33 ComboCardDataExporter, DataForBursaryExporter, 34 34 StudentUnpaidPaymentExporter, … … 1152 1152 1153 1153 1154 class S tudentPaymentsOverviewExporterTest(StudentImportExportSetup):1154 class SchoolFeePaymentsOverviewExporterTest(StudentImportExportSetup): 1155 1155 1156 1156 layer = FunctionalLayer 1157 1157 1158 1158 def setUp(self): 1159 super(S tudentPaymentsOverviewExporterTest, self).setUp()1159 super(SchoolFeePaymentsOverviewExporterTest, self).setUp() 1160 1160 self.setup_for_export() 1161 1161 return … … 1163 1163 def test_ifaces(self): 1164 1164 # make sure we fullfill interface contracts 1165 obj = S tudentPaymentsOverviewExporter()1165 obj = SchoolFeePaymentsOverviewExporter() 1166 1166 verifyObject(ICSVStudentExporter, obj) 1167 verifyClass(ICSVStudentExporter, S tudentPaymentsOverviewExporter)1167 verifyClass(ICSVStudentExporter, SchoolFeePaymentsOverviewExporter) 1168 1168 return 1169 1169 1170 1170 def test_get_as_utility(self): 1171 1171 # we can get a payments exporter as utility 1172 result = queryUtility(ICSVExporter, name=" paymentsoverview")1172 result = queryUtility(ICSVExporter, name="sfpaymentsoverview") 1173 1173 self.assertTrue(result is not None) 1174 1174 return … … 1176 1176 def test_export(self): 1177 1177 self.setup_student(self.student) 1178 exporter = S tudentPaymentsOverviewExporter()1178 exporter = SchoolFeePaymentsOverviewExporter() 1179 1179 exporter.export([self.student], self.outfile) 1180 1180 result = open(self.outfile, 'rb').read() … … 1219 1219 payment_4.p_category = u'schoolfee' 1220 1220 self.student['payments']['my-4thpayment'] = payment_4 1221 exporter = S tudentPaymentsOverviewExporter()1221 exporter = SchoolFeePaymentsOverviewExporter() 1222 1222 exporter.export_all(self.app, self.outfile) 1223 1223 result = open(self.outfile, 'rb').read() -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r14915 r15047 1073 1073 'studentstudylevels', 'coursetickets', 1074 1074 'studentpayments', 'studentunpaidpayments', 1075 'bedtickets', ' paymentsoverview',1075 'bedtickets', 'sfpaymentsoverview', 1076 1076 'studylevelsoverview', 'combocard', 'bursary') 1077 1077
Note: See TracChangeset for help on using the changeset viewer.