source: main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py @ 14583

Last change on this file since 14583 was 14583, checked in by Henrik Bettermann, 8 years ago

Update IStudentsUtils.

  • Property svn:keywords set to Id
File size: 27.0 KB
Line 
1## $Id: interfaces.py 14583 2017-02-24 06:05:20Z henrik $
2##
3## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18#from datetime import datetime
19from zope.component import getUtility
20from zope.interface import Attribute, Interface
21from zope import schema
22from zc.sourcefactory.contextual import BasicContextualSourceFactory
23from waeup.kofa.browser.interfaces import IStudentNavigationBase
24from waeup.kofa.interfaces import (
25    IKofaObject, academic_sessions_vocab, validate_email, ICSVExporter,
26    ContextualDictSourceFactoryBase, IKofaUtils)
27from waeup.kofa.interfaces import MessageFactory as _
28from waeup.kofa.schema import TextLineChoice, FormattedDate, PhoneNumber
29from waeup.kofa.students.vocabularies import (
30    StudyLevelSource, contextual_reg_num_source, contextual_mat_num_source,
31    GenderSource, nats_vocab
32    )
33from waeup.kofa.payments.interfaces import (
34    IPaymentsContainer, IOnlinePayment)
35from waeup.kofa.university.vocabularies import (
36    CourseSource, StudyModeSource, CertificateSource, SemesterSource,
37    )
38
39class PreviousPaymentCategorySource(ContextualDictSourceFactoryBase):
40    """A source that delivers all selectable categories of previous session
41    payments.
42    """
43    #: name of dict to deliver from kofa utils.
44    DICT_NAME = 'PREVIOUS_PAYMENT_CATEGORIES'
45
46class BalancePaymentCategorySource(ContextualDictSourceFactoryBase):
47    """A source that delivers all selectable items of balance payments.
48    """
49    #: name of dict to deliver from kofa utils.
50    DICT_NAME = 'BALANCE_PAYMENT_CATEGORIES'
51
52# VerdictSource can't be placed into the vocabularies module because it
53# requires importing IStudentsUtils which then leads to circular imports.
54class VerdictSource(BasicContextualSourceFactory):
55    """A verdicts source delivers all verdicts provided
56    in the portal.
57    """
58    def getValues(self, context):
59        verdicts_dict = getUtility(IKofaUtils).VERDICTS_DICT
60        return sorted(verdicts_dict.keys())
61
62    def getToken(self, context, value):
63        return value
64
65    def getTitle(self, context, value):
66        verdicts_dict = getUtility(IKofaUtils).VERDICTS_DICT
67        if value != '0':
68            return verdicts_dict[value] + ' (%s)' % value
69        return verdicts_dict[value]
70
71
72class IStudentsUtils(Interface):
73    """A collection of methods which are subject to customization.
74    """
75    def setReturningData(student):
76        """ This method defines what happens after school fee payment
77        depending on the student's senate verdict.
78
79        In the base configuration current level is always increased
80        by 100 no matter which verdict has been assigned.
81        """
82
83    def setPaymentDetails(category, student, previous_session=None,
84            previous_level=None,):
85        """Create Payment object and set the payment data of a student for
86        the payment category specified.
87        """
88
89    def increaseMatricInteger(student):
90        """Increase counter for matric numbers.
91
92        This counter can be a centrally stored attribute or an attribute of
93        faculties, departments or certificates. In the base package the counter
94        is as an attribute of the site configuration object.
95        """
96
97    def constructMatricNumber(student):
98        """Fetch the matric number counter which fits the student and
99        construct the new matric number of the student.
100
101        In the base package the counter is returned which is as an attribute
102        of the site configuration object.
103        """
104
105    def setMatricNumber(student):
106        """Set matriculation number of student.
107
108        If the student's matric number is unset a new matric number is
109        constructed according to the matriculation number construction rules
110        defined in the constructMatricNumber method. The new matric number is
111        set, the students catalog updated. The corresponding matric number
112        counter is increased by one.
113
114        This method is tested but not used in the base package. It can
115        be used in custom packages by adding respective views
116        and by customizing increaseMatricInteger and constructMatricNumber
117        according to the university's matriculation number construction rules.
118
119        The method can be disabled by setting the counter to zero.
120        """
121
122    def getAccommodation_details(student):
123        """Determine the accommodation dates of a student.
124        """
125
126    def selectBed(available_beds):
127        """Select a bed from a list of available beds.
128        In the standard configuration we select the first bed found,
129        but can also randomize the selection if we like.
130        """
131
132    def getPDFCreator(context):
133        """Get some IPDFCreator instance suitable for use with `context`.
134        """
135
136    def renderPDF(view, subject='', filename='slip.pdf',):
137        """Render pdf slips for various pages.
138        """
139
140    def getDegreeClassNumber(level_obj):
141        """Get degree class number (used for SessionResultsPresentation
142        reports).
143        """
144
145    def renderPDFTranscript(view, filename, student,
146                  studentview, note, signatures, sigs_in_footer,
147                  show_scans, topMargin, omit_fields,
148                  tableheader, no_passport):
149        """Render pdf slip of a transcripts.
150        """
151
152    def renderPDFCourseticketsOverview(view, session, data, lecturers):
153        """Render pdf slip of course tickets for a lecturer.
154        """
155
156    def maxCreditsExceeded(studylevel, course=None):
157        """Return True if maximum credits is exceeded.
158        """
159
160    def getBedCoordinates(bedticket):
161        """Return descriptive bed coordinates.
162        This method can be used to customize the `display_coordinates`
163        property method in order to  display a
164        customary description of the bed space.
165        """
166
167    def clearance_disabled_message(student):
168        """Render message if clearance is disabled.
169        """
170
171class IStudentsContainer(IKofaObject):
172    """A students container contains university students.
173    """
174    def addStudent(student):
175        """Add an IStudent object and subcontainers.
176        """
177
178    unique_student_id = Attribute('A unique student id')
179
180class IStudentNavigation(IStudentNavigationBase):
181    """Interface needed for navigation and logging. This interface is
182    implemented by all content classes in the students section.
183    """
184    student = Attribute('Student object of context')
185
186    def writeLogMessage(view, message):
187        """Add an INFO message to students.log.
188        """
189
190class IStudentBase(IKofaObject):
191    """Representation of student base data.
192    """
193    history = Attribute('Object history, a list of messages')
194    state = Attribute('Registration state')
195    translated_state = Attribute('Real name of the registration state')
196    certcode = Attribute('Certificate code of any chosen study course')
197    depcode = Attribute('Department code of any chosen study course')
198    faccode = Attribute('Faculty code of any chosen study course')
199    entry_session = Attribute('Entry session')
200    current_session = Attribute('Current session')
201    current_level = Attribute('Current level')
202    current_mode = Attribute('Current mode')
203    current_verdict = Attribute('Current verdict')
204    fullname = Attribute('All name parts separated by hyphens')
205    display_fullname = Attribute('Fullname as displayed on pages')
206    is_postgrad = Attribute('True if postgraduate student')
207    is_special_postgrad = Attribute('True if special postgraduate student')
208    is_fresh = Attribute('True if fresh student')
209    before_payment = Attribute('True if no previous payment has to be made')
210    personal_data_expired = Attribute('True if personal data expired')
211    transcript_enabled = Attribute('True if transcript processing is enabled')
212    clearance_locked = Attribute('True if clearance form is locked')
213
214    password = Attribute('Encrypted password')
215    temp_password = Attribute('Dictionary with user name, timestamp and encrypted password')
216
217    suspended = schema.Bool(
218        title = _(u'Account suspended'),
219        default = False,
220        required = False,
221        )
222
223    suspended_comment = schema.Text(
224        title = _(u"Reasons for Deactivation"),
225        required = False,
226        description = _(
227            u'This message will be shown if and only if deactivated '
228            'students try to login.'),
229        )
230
231    flash_notice = schema.TextLine(
232        title = _(u'Flash Notice'),
233        required = False,
234        readonly = False,
235        description = _(
236            u'This single-line message will be shown in a flash box.'),
237        )
238
239    student_id = schema.TextLine(
240        title = _(u'Student Id'),
241        required = False,
242        )
243
244    firstname = schema.TextLine(
245        title = _(u'First Name'),
246        required = True,
247        )
248
249    middlename = schema.TextLine(
250        title = _(u'Middle Name'),
251        required = False,
252        )
253
254    lastname = schema.TextLine(
255        title = _(u'Last Name (Surname)'),
256        required = True,
257        )
258
259    sex = schema.Choice(
260        title = _(u'Sex'),
261        source = GenderSource(),
262        required = True,
263        )
264
265    reg_number = TextLineChoice(
266        title = _(u'Registration Number'),
267        required = True,
268        readonly = False,
269        source = contextual_reg_num_source,
270        )
271
272    matric_number = TextLineChoice(
273        title = _(u'Matriculation Number'),
274        required = False,
275        readonly = False,
276        source = contextual_mat_num_source,
277        )
278
279    adm_code = schema.TextLine(
280        title = _(u'PWD Activation Code'),
281        required = False,
282        readonly = False,
283        )
284
285    email = schema.ASCIILine(
286        title = _(u'Email'),
287        required = False,
288        constraint=validate_email,
289        )
290    phone = PhoneNumber(
291        title = _(u'Phone'),
292        required = False,
293        )
294
295    def setTempPassword(user, password):
296        """Set a temporary password (LDAP-compatible) SSHA encoded for
297        officers.
298        """
299
300    def getTempPassword():
301        """Check if a temporary password has been set and if it
302        is not expired. Return the temporary password if valid,
303        None otherwise. Unset the temporary password if expired.
304        """
305
306    def transfer(certificate, current_session,
307        current_level, current_verdict):
308        """ Creates a new studycourse and backups the old one.
309        """
310
311    def revert_transfer():
312        """ Revert previous transfer.
313        """
314
315class IUGStudentClearance(IKofaObject):
316    """Representation of undergraduate student clearance data.
317    """
318    officer_comment = schema.Text(
319        title = _(u"Officer's Comment"),
320        required = False,
321        )
322
323    clr_code = schema.TextLine(
324        title = _(u'CLR Activation Code'),
325        required = False,
326        readonly = False,
327        )
328
329    date_of_birth = FormattedDate(
330        title = _(u'Date of Birth'),
331        required = True,
332        show_year = True,
333        )
334
335    nationality = schema.Choice(
336        vocabulary = nats_vocab,
337        title = _(u'Nationality'),
338        required = False,
339        )
340
341class IPGStudentClearance(IUGStudentClearance):
342    """Representation of postgraduate student clearance data.
343    """
344    employer = schema.TextLine(
345        title = _(u'Employer'),
346        required = False,
347        readonly = False,
348        )
349
350class IStudentPersonal(IKofaObject):
351    """Representation of student personal data.
352    """
353    personal_updated = schema.Datetime(
354        title = _(u'Updated'),
355        required = False,
356        readonly = False,
357        )
358
359    perm_address = schema.Text(
360        title = _(u'Permanent Address'),
361        required = False,
362        )
363
364class IStudentTranscript(IKofaObject):
365    """Representation of student transcript data.
366    """
367
368    transcript_comment = schema.Text(
369        title = _(u'Comment'),
370        required = False,
371        )
372
373
374class IStudent(IStudentBase,IUGStudentClearance,IPGStudentClearance,
375    IStudentPersonal, IStudentTranscript):
376    """Representation of a student.
377    """
378
379class IStudentPersonalEdit(IStudentPersonal):
380    """Interface for editing personal data by students.
381    Here we can repeat the fields from IStudentPersonal and set the
382    `required` if necessary.
383    """
384
385    perm_address = schema.Text(
386        title = _(u'Permanent Address'),
387        required = True,
388        )
389
390class IStudentUpdateByRegNo(IStudent):
391    """Representation of a student. Skip regular reg_number validation.
392    """
393    reg_number = schema.TextLine(
394        title = _(u'Registration Number'),
395        required = False,
396        )
397
398class IStudentUpdateByMatricNo(IStudent):
399    """Representation of a student. Skip regular matric_number validation.
400    """
401    matric_number = schema.TextLine(
402        title = _(u'Matriculation Number'),
403        required = False,
404        )
405
406class IStudentRequestPW(IStudent):
407    """Representation of a student for first-time password request.
408    This interface is used when students use the requestpw page to
409    login for the the first time.
410    """
411    number = schema.TextLine(
412        title = _(u'Registr. or Matric. Number'),
413        required = True,
414        )
415
416    firstname = schema.TextLine(
417        title = _(u'First Name'),
418        required = True,
419        )
420
421    email = schema.ASCIILine(
422        title = _(u'Email Address'),
423        required = True,
424        constraint=validate_email,
425        )
426
427class IStudentStudyCourse(IKofaObject):
428    """Representation of student study course data.
429    """
430    next_session_allowed = Attribute('True if the student can proceed to next session')
431    is_postgrad = Attribute('True if student is postgraduate student')
432    is_current = Attribute('True if the study course is the current course of studies')
433    is_previous = Attribute('True if the study course is the previous course of studies')
434
435    certificate = schema.Choice(
436        title = _(u'Certificate'),
437        source = CertificateSource(),
438        required = False,
439        )
440
441    entry_mode = schema.Choice(
442        title = _(u'Entry Mode'),
443        source = StudyModeSource(),
444        required = True,
445        readonly = False,
446        )
447
448    entry_session = schema.Choice(
449        title = _(u'Entry Session'),
450        source = academic_sessions_vocab,
451        #default = datetime.now().year,
452        required = True,
453        readonly = False,
454        )
455
456    current_session = schema.Choice(
457        title = _(u'Current Session'),
458        source = academic_sessions_vocab,
459        required = True,
460        readonly = False,
461        )
462
463    current_level = schema.Choice(
464        title = _(u'Current Level'),
465        source = StudyLevelSource(),
466        required = False,
467        readonly = False,
468        )
469
470    current_verdict = schema.Choice(
471        title = _(u'Current Verdict'),
472        source = VerdictSource(),
473        default = '0',
474        required = False,
475        )
476
477    previous_verdict = schema.Choice(
478        title = _(u'Previous Verdict'),
479        source = VerdictSource(),
480        default = '0',
481        required = False,
482        )
483
484    def addStudentStudyLevel(cert, studylevel):
485        """Add a study level object.
486        """
487
488    def getTranscriptData():
489        """Get a sorted list of dicts with level and course ticket data.
490        This method is used for transcripts.
491        """
492
493class IStudentStudyCourseTransfer(IStudentStudyCourse):
494    """An interface used for student transfers.
495    """
496    certificate = schema.Choice(
497        title = _(u'Certificate'),
498        source = CertificateSource(),
499        required = True,
500        )
501
502    current_level = schema.Choice(
503        title = _(u'Current Level'),
504        source = StudyLevelSource(),
505        required = True,
506        readonly = False,
507        )
508
509    entry_session = schema.Choice(
510        title = _(u'Entry Session'),
511        source = academic_sessions_vocab,
512        #default = datetime.now().year,
513        required = False,
514        readonly = False,
515        )
516
517
518IStudentStudyCourseTransfer['certificate'].order = IStudentStudyCourse[
519    'certificate'].order
520IStudentStudyCourseTransfer['current_level'].order = IStudentStudyCourse[
521    'current_level'].order
522
523class IStudentStudyCourseTranscript(IKofaObject):
524    """An interface for student transcripts.
525    """
526    entry_mode = schema.Choice(
527        title = _(u'Entry Mode'),
528        source = StudyModeSource(),
529        required = True,
530        readonly = False,
531        )
532
533    entry_session = schema.Choice(
534        title = _(u'Entry Session'),
535        source = academic_sessions_vocab,
536        #default = datetime.now().year,
537        required = True,
538        readonly = False,
539        )
540
541class IStudentVerdictUpdate(IKofaObject):
542    """A interface for verdict imports.
543    """
544    current_verdict = schema.Choice(
545        title = _(u'Current Verdict'),
546        source = VerdictSource(),
547        required = True,
548        )
549
550    current_session = schema.Choice(
551        title = _(u'Current Session'),
552        source = academic_sessions_vocab,
553        required = True,
554        )
555
556    current_level = schema.Choice(
557        title = _(u'Current Level'),
558        source = StudyLevelSource(),
559        required = True,
560        )
561
562    bypass_validation = schema.Bool(
563        title = _(u'Bypass validation'),
564        required = False,
565        )
566
567    validated_by = schema.TextLine(
568        title = _(u'Validated by'),
569        required = False,
570        )
571
572class IStudentStudyLevel(IKofaObject):
573    """A representation of student study level data.
574    """
575    certcode = Attribute('The certificate code of the study course')
576    is_current_level = Attribute('True if level is current level of the student')
577    level_title = Attribute('Level title from source')
578    getSessionString = Attribute('Session title from source')
579    number_of_tickets = Attribute('Number of tickets contained in this level')
580    passed_params = Attribute('Information about passed and failed courses')
581    gpa_params_rectified = Attribute('Corrected sessional GPA parameters')
582    gpa_params = Attribute('GPA parameters for this level.')
583    cumulative_params = Attribute(
584        'Cumulative GPA and other cumulative parameters for this level')
585    course_registration_forbidden = Attribute(
586        'Return error message if course registration is forbidden')
587
588    level = schema.Choice(
589        title = _(u'Level'),
590        source = StudyLevelSource(),
591        required = True,
592        readonly = False,
593        )
594
595    level_session = schema.Choice(
596        title = _(u'Session'),
597        source = academic_sessions_vocab,
598        required = True,
599        )
600
601    level_verdict = schema.Choice(
602        title = _(u'Verdict'),
603        source = VerdictSource(),
604        default = '0',
605        required = False,
606        )
607
608    validated_by = schema.TextLine(
609        title = _(u'Validated by'),
610        default = None,
611        required = False,
612        )
613
614    validation_date = schema.Datetime(
615        title = _(u'Validation Date'),
616        required = False,
617        readonly = False,
618        )
619
620    total_credits = schema.Int(
621        title = _(u'Total Credits'),
622        required = False,
623        readonly = True,
624        )
625
626    gpa = schema.TextLine(
627        title = _(u'Unrectified GPA'),
628        required = False,
629        readonly = True,
630        )
631
632    def addCourseTicket(ticket, course):
633        """Add a course ticket object.
634        """
635
636    def addCertCourseTickets(cert):
637        """Collect all certificate courses and create course
638        tickets automatically.
639        """
640
641class ICourseTicket(IKofaObject):
642    """A representation of course ticket data.
643    """
644    certcode = Attribute('Certificate code of the study course')
645    level_session = Attribute('Session of the study level the ticket has been added to')
646    level = Attribute('Level value of the study level the ticket has been added to')
647    total_score = Attribute('Score')
648    grade = Attribute('Grade calculated from total score')
649    weight = Attribute('Weight calculated from total score')
650    removable_by_student = Attribute('True if student is allowed to remove the ticket')
651    editable_by_lecturer = Attribute('True if lecturer is allowed to edit the ticket')
652
653    code = Attribute('Code of the original course')
654
655    title = schema.TextLine(
656        title = _(u'Title'),
657        required = False,
658        )
659
660    fcode = schema.TextLine(
661        title = _(u'Faculty Code'),
662        required = False,
663        )
664
665    dcode = schema.TextLine(
666        title = _(u'Department Code'),
667        required = False,
668        )
669
670    semester = schema.Choice(
671        title = _(u'Semester/Term'),
672        source = SemesterSource(),
673        required = False,
674        )
675
676    passmark = schema.Int(
677        title = _(u'Passmark'),
678        required = False,
679        )
680
681    credits = schema.Int(
682        title = _(u'Credits'),
683        required = False,
684        )
685
686    mandatory = schema.Bool(
687        title = _(u'Required'),
688        default = False,
689        required = False,
690        )
691
692    outstanding = schema.Bool(
693        title = _(u'Outstanding Course'),
694        default = False,
695        required = False,
696        )
697
698    score = schema.Int(
699        title = _(u'Score'),
700        default = None,
701        required = False,
702        missing_value = None,
703        )
704
705    carry_over = schema.Bool(
706        title = _(u'Carry-over Course'),
707        default = False,
708        required = False,
709        )
710
711    automatic = schema.Bool(
712        title = _(u'Automatical Creation'),
713        default = False,
714        required = False,
715        )
716
717class ICourseTicketAdd(IKofaObject):
718    """An interface for adding course tickets.
719    """
720    course = schema.Choice(
721        title = _(u'Course'),
722        source = CourseSource(),
723        readonly = False,
724        )
725
726class ICourseTicketImport(ICourseTicket):
727    """An interface for importing course results and nothing more.
728    """
729    score = schema.Int(
730        title = _(u'Score'),
731        required = False,
732        readonly = False,
733        )
734
735    level_session = schema.Choice(
736        title = _(u'Level Session'),
737        source = academic_sessions_vocab,
738        required = False,
739        readonly = False,
740        )
741
742class IStudentAccommodation(IKofaObject):
743    """A container for student accommodation objects.
744    """
745
746    desired_hostel = schema.TextLine(
747        title = _(u'Desired Hostel'),
748        required = False,
749        )
750
751    def addBedTicket(bedticket):
752        """Add a bed ticket object.
753        """
754
755
756class IBedTicket(IKofaObject):
757    """A representation of accommodation booking data.
758    """
759    bed = Attribute('The bed object')
760    maint_payment_made = Attribute('True if maintenance payment is made')
761
762    display_coordinates = schema.TextLine(
763        title = _(u'Allocated Bed'),
764        required = False,
765        readonly = True,
766        )
767
768    bed_coordinates = schema.TextLine(
769        title = u'',
770        required = True,
771        readonly = False,
772        )
773
774    bed_type = schema.TextLine(
775        title = _(u'Requested Bed Type'),
776        required = True,
777        readonly = False,
778        )
779
780    booking_session = schema.Choice(
781        title = _(u'Session'),
782        source = academic_sessions_vocab,
783        required = True,
784        readonly = False
785        )
786
787    booking_date = schema.Datetime(
788        title = _(u'Booking Date'),
789        required = False,
790        readonly = False,
791        )
792
793    booking_code = schema.TextLine(
794        title = _(u'Booking Activation Code'),
795        required = False,
796        readonly = False,
797        )
798
799    def getSessionString():
800        """Returns the title of academic_sessions_vocab term of the session
801        when the bed was booked.
802        """
803
804class IStudentPaymentsContainer(IPaymentsContainer):
805    """A container for student payment objects.
806    """
807
808    certificate = Attribute('Certificate to determine the correct p_level value')
809
810class IStudentOnlinePayment(IOnlinePayment):
811    """A student payment via payment gateways.
812    """
813
814    certificate = Attribute('Certificate to determine the correct p_level value')
815    student = Attribute('Student')
816
817    p_current = schema.Bool(
818        title = _(u'Current Session Payment'),
819        default = True,
820        required = False,
821        )
822
823    p_level = schema.Choice(
824        title = _(u'Payment Level'),
825        source = StudyLevelSource(),
826        required = False,
827        )
828
829    def redeemTicket():
830        """Either create an appropriate access code or trigger an action
831        directly.
832        """
833
834    def doAfterStudentPayment():
835        """Process student after payment was made.
836        """
837
838    def doAfterStudentPaymentApproval():
839        """Process student after payment was approved.
840        """
841
842    def approveStudentPayment():
843        """Approve payment and process student.
844        """
845
846IStudentOnlinePayment['p_level'].order = IStudentOnlinePayment[
847    'p_session'].order
848
849class IStudentPreviousPayment(IKofaObject):
850    """An interface for adding previous session payments.
851    """
852
853    p_category = schema.Choice(
854        title = _(u'Payment Category'),
855        default = u'schoolfee',
856        source = PreviousPaymentCategorySource(),
857        required = True,
858        )
859
860    p_session = schema.Choice(
861        title = _(u'Payment Session'),
862        source = academic_sessions_vocab,
863        required = True,
864        )
865
866    p_level = schema.Choice(
867        title = _(u'Payment Level'),
868        source = StudyLevelSource(),
869        required = True,
870        )
871
872class IStudentBalancePayment(IKofaObject):
873    """An interface for adding balances.
874    """
875
876    p_category = schema.Choice(
877        title = _(u'Payment Category'),
878        default = u'schoolfee',
879        required = True,
880        source = BalancePaymentCategorySource(),
881        )
882
883    balance_session = schema.Choice(
884        title = _(u'Payment Session'),
885        source = academic_sessions_vocab,
886        required = True,
887        )
888
889    balance_level = schema.Choice(
890        title = _(u'Payment Level'),
891        source = StudyLevelSource(),
892        required = True,
893        )
894
895    balance_amount = schema.Float(
896        title = _(u'Balance Amount'),
897        default = None,
898        required = True,
899        readonly = False,
900        description = _(
901            u'Balance in Naira '),
902        )
903
904class ICSVStudentExporter(ICSVExporter):
905    """A regular ICSVExporter that additionally supports exporting
906      data from a given student object.
907    """
908    def get_filtered(site, **kw):
909        """Get a filtered set of students.
910        """
911
912    def get_selected(site, selected):
913        """Get set of selected students.
914        """
915
916    def export_student(student, filepath=None):
917        """Export data for a given student.
918        """
919
920    def export_filtered(site, filepath=None, **kw):
921        """Export data for filtered set of students.
922        """
923
924    def export_selected(site, filepath=None, **kw):
925        """Export data for selected set of students.
926        """
Note: See TracBrowser for help on using the repository browser.