Changeset 12862 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 19 Apr 2015, 05:32:19 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py
r12861 r12862 65 65 class ApplicantExporter(grok.GlobalUtility, ExporterBase): 66 66 """The Applicant Exporter exports application records (= applicants) 67 stored in the database. In contrast to the exporters in the academic s67 stored in the database. In contrast to the exporters in the academic 68 68 section this exporter does not iterate over the items of containers 69 69 but searches the :class:`ApplicantsCatalog` instead. -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r12840 r12862 741 741 742 742 class SearchPage(KofaPage): 743 """General search page for the academic ssection.743 """General search page for the academic section. 744 744 """ 745 745 grok.context(IFacultiesContainer) -
main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
r12847 r12862 377 377 class AcademicsOfficer(grok.Role): 378 378 """An Academics Officer can view but not edit data in the 379 Academics Section.379 academic section. 380 380 381 381 This is the default role which is automatically assigned to all … … 389 389 class AcademicsManager(grok.Role): 390 390 """An Academics Manager can view and edit all data in the 391 Academics Section, i.e. access all manage pages391 scademic section, i.e. access all manage pages 392 392 at faculty, department, course, certificate and certificate course level. 393 393 """ -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r12861 r12862 290 290 """The Student Study Level Exporter first filters the set of students 291 291 by searching the students catalog. Then it exports the data of the student's 292 study level container sbut not their content (course tickets).292 study level container data but not their content (course tickets). 293 293 The exporter iterates over all objects in the students' ``studycourse`` 294 294 containers. … … 325 325 exports those course tickets which belong to the given course code and 326 326 also meet level and level_session passed through at the same time. 327 This happens if the exporter is called at course level in the academic s327 This happens if the exporter is called at course level in the academic 328 328 section. 329 329 """ … … 351 351 352 352 class StudentPaymentsExporter(grok.GlobalUtility, StudentExporterBase): 353 """Exporter for OnlinePayment instances. 353 """The Student Payments Exporter first filters the set of students 354 by searching the students catalog. Then it exports student payment 355 tickets by iterating over the items of the student's ``payments`` 356 container. If the payment period is given only tickets, which were 357 paid in payment period, are considered for export. 354 358 """ 355 359 grok.name('studentpayments') 356 360 357 #: Fieldnames considered by this exporter358 361 fields = tuple( 359 362 sorted(iface_names( … … 361 364 omit=['display_item']))) + ( 362 365 'student_id','state','current_session') 363 364 #: The title under which this exporter will be displayed365 366 title = _(u'Student Payments') 366 367 … … 369 370 370 371 def mangle_value(self, value, name, context=None): 371 """Treat location values special. 372 """The mangler determines the student's id, registration 373 state and current session. 372 374 """ 373 375 if context is not None: … … 381 383 382 384 class DataForBursaryExporter(StudentPaymentsExporter): 383 """Exporter for OnlinePayment instances. 385 """The DataForBursary Exporter works just like the Student Payments Exporter 386 but it exports much more information about the student. It combines 387 payment and student data in one table in order to spare postprocessing of 388 two seperate export files. The exporter is primarily used by bursary 389 officers who have exclusively access to this exporter. 384 390 """ 385 391 grok.name('bursary') … … 388 394 return get_payments(x, paid=True, **kw) 389 395 390 #: Fieldnames considered by this exporter391 396 fields = tuple( 392 397 sorted(iface_names( … … 398 403 'entry_session', 'entry_mode', 399 404 'faccode', 'depcode','certcode') 400 401 #: The title under which this exporter will be displayed402 405 title = _(u'Payment Data for Bursary') 403 406 404 407 def mangle_value(self, value, name, context=None): 405 """T reat location values special.408 """The mangler fetches the student data. 406 409 """ 407 410 if context is not None: … … 419 422 420 423 class BedTicketsExporter(grok.GlobalUtility, StudentExporterBase): 421 """Exporter for BedTicket instances. 424 """The Bed Tickets Exporter first filters the set of students 425 by searching the students catalog. Then it exports bed 426 tickets by iterating over the items of the student's ``accommodation`` 427 container. 422 428 """ 423 429 grok.name('bedtickets') 424 430 425 #: Fieldnames considered by this exporter426 431 fields = tuple( 427 432 sorted(iface_names( … … 429 434 omit=['display_coordinates']))) + ( 430 435 'student_id', 'actual_bed_type') 431 432 #: The title under which this exporter will be displayed433 436 title = _(u'Bed Tickets') 434 437 … … 437 440 438 441 def mangle_value(self, value, name, context=None): 439 """Treat location values and others special. 442 """The mangler determines the student id and the type of the bed 443 which has been booked in the ticket. 440 444 """ 441 445 if context is not None: … … 452 456 453 457 class StudentPaymentsOverviewExporter(StudentExporter): 454 """Exporter for students with payment overview. 458 """The Student Payments Overview Exporter first filters the set of students 459 by searching the students catalog. Then it exports some student base data 460 together with the total school fee amount paid in each year over a 461 predefined year range (current year - 9, ... , current year + 1). 455 462 """ 456 463 grok.name('paymentsoverview') … … 460 467 year_range_tuple = tuple([str(year) for year in year_range]) 461 468 462 #: Fieldnames considered by this exporter463 469 fields = ('student_id', 'matric_number', 'display_fullname', 464 470 'state', 'certcode', 'faccode', 'depcode', 'is_postgrad', 465 471 'current_level', 'current_session', 'current_mode', 466 472 ) + year_range_tuple 467 468 #: The title under which this exporter will be displayed469 473 title = _(u'Student Payments Overview') 470 474 471 475 def mangle_value(self, value, name, context=None): 476 """The mangler summarizes the school fee amounts made per year. It 477 iterates over all paid school fee payment tickets and 478 adds together the amounts paid in a year. Waived payments 479 are marked ``waived``. 480 """ 472 481 if name in self.year_range_tuple and context is not None: 473 482 value = 0 … … 490 499 491 500 class StudentStudyLevelsOverviewExporter(StudentExporter): 492 """Exporter for students with study level overview. 501 """The Student Study Levels Overview Exporter first filters the set of 502 students by searching the students catalog. Then it exports some student 503 base data together with the session key of registered levels. 504 Sample output: 505 506 header: ``...100,110,120,200,210,220,300...`` 507 508 data: ``...2010,,,2011,2012,,2013...`` 509 510 This csv data string means that level 100 was registered in session 511 2010/2011, level 200 in session 2011/2012, level 210 (200 on 1st probation) 512 in session 2012/2013 and level 300 in session 2013/2014. 493 513 """ 494 514 grok.name('studylevelsoverview') … … 496 516 avail_levels = tuple([str(x) for x in study_levels(None)]) 497 517 498 #: Fieldnames considered by this exporter499 518 fields = ('student_id', ) + ( 500 519 'state', 'certcode', 'faccode', 'depcode', 'is_postgrad', 501 520 'entry_session', 'current_level', 'current_session', 502 521 ) + avail_levels 503 504 #: The title under which this exporter will be displayed505 522 title = _(u'Student Study Levels Overview') 506 523 507 524 def mangle_value(self, value, name, context=None): 525 """The mangler checks if a given level has been registered. It returns 526 the ``level_session`` attribute of the student study level object 527 if the named level exists. 528 """ 508 529 if name in self.avail_levels and context is not None: 509 530 value = '' 510 531 for level in context['studycourse'].values(): 511 532 if level.level == int(name): 512 #value = '%s|%s|%s|%s' % (513 # level.level_session,514 # len(level),515 # level.validated_by,516 # level.level_verdict)517 533 value = '%s' % level.level_session 518 534 break … … 522 538 523 539 class ComboCardDataExporter(grok.GlobalUtility, StudentExporterBase): 524 """Exporter for Interswitch Combo Card Data. 540 """Like all other exporters the Combo Card Data Exporter first filters the 541 set of students by searching the students catalog. Then it exports some 542 student base data which are neccessary to print for the Interswitch combo 543 card (identity card for students). The output contains a ``passport_path`` 544 column which contains the filesystem path of the passport image file. 545 If no path is given, no passport image file exists. 525 546 """ 526 547 grok.name('combocard') 527 548 528 #: Fieldnames considered by this exporter529 549 fields = ('display_fullname', 530 550 'student_id','matric_number', 531 551 'certificate', 'faculty', 'department', 'passport_path') 532 533 #: The title under which this exporter will be displayed534 552 title = _(u'Combo Card Data') 535 553 536 554 def mangle_value(self, value, name, context=None): 555 """The mangler determines the titles of faculty, department 556 and certificate. It also computes the path of passport image file 557 stored in the filesystem. 558 """ 537 559 certificate = context['studycourse'].certificate 538 560 if name == 'certificate' and certificate is not None: … … 543 565 value = certificate.__parent__.__parent__.__parent__.longtitle 544 566 if name == 'passport_path' and certificate is not None: 545 file_id = IFileStoreNameChooser(context).chooseName(attr='passport.jpg') 567 file_id = IFileStoreNameChooser(context).chooseName( 568 attr='passport.jpg') 546 569 os_path = getUtility(IExtFileStore)._pathFromFileID(file_id) 547 570 if not os.path.exists(os_path): -
main/waeup.kofa/trunk/src/waeup/kofa/university/vocabularies.py
r11450 r12862 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """Vocabularies and sources for the academic ssection.18 """Vocabularies and sources for the academic section. 19 19 """ 20 20 from zc.sourcefactory.basic import BasicSourceFactory
Note: See TracChangeset for help on using the changeset viewer.