Changeset 8582


Ignore:
Timestamp:
31 May 2012, 20:32:43 (12 years ago)
Author:
Henrik Bettermann
Message:

Customize IApplicantUpdateByRegNo, IStudentUpdateByRegNo, IStudentUpdateByMatricNo. Otherwise additional fields in ICustomApplicant or ICustomSrtudent won't be converted which leads to WrongType? errors.

Location:
main/waeup.uniben/trunk/src/waeup/uniben
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/batching.py

    r8378 r8582  
    2121from waeup.kofa.utils.batching import BatchProcessor
    2222from waeup.kofa.applicants.batching import ApplicantProcessor
    23 from waeup.uniben.applicants.interfaces import ICustomApplicant
     23from waeup.uniben.applicants.interfaces import (
     24    ICustomApplicant, ICustomApplicantUpdateByRegNo)
    2425
    2526class CustomApplicantProcessor(ApplicantProcessor):
     
    3637    """
    3738    iface = ICustomApplicant
     39    iface_byregnumber = ICustomApplicantUpdateByRegNo
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py

    r8577 r8582  
    4949PG_OMIT_EDIT_FIELDS = PG_OMIT_MANAGE_FIELDS + (
    5050    'locked', 'course_admitted',
    51     'student_id', 'screening_score', 'screening_venue', 'notice')
     51    'student_id', 'screening_score', 'screening_venue', 'notice',
     52    'screening_date')
    5253
    5354class IUGApplicant(IApplicantBaseData):
     
    276277        readonly = False,
    277278        )
     279    screening_date = schema.TextLine(
     280        title = _(u'Screening Date'),
     281        required = False,
     282        )
    278283    screening_score = schema.Int(
    279284        title = _(u'Screening Score'),
     
    366371IPUTMEApplicantEdit[
    367372    'email'].order =  IUGApplicant['email'].order
     373
     374class ICustomApplicantUpdateByRegNo(ICustomApplicant):
     375    """Representation of an applicant.
     376
     377    Skip regular reg_number validation if reg_number is used for finding
     378    the applicant object.
     379    """
     380    reg_number = schema.TextLine(
     381        title = u'Registration Number',
     382        required = False,
     383        )
  • main/waeup.uniben/trunk/src/waeup/uniben/students/batching.py

    r8204 r8582  
    2525"""
    2626from waeup.uniben.students.interfaces import (
    27     ICustomStudent,
     27    ICustomStudent, ICustomStudentUpdateByRegNo,
     28    ICustomStudentUpdateByMatricNo
    2829    )
    2930from waeup.kofa.students.batching import StudentProcessor
     
    3334    """
    3435    iface = ICustomStudent
     36    iface_byregnumber = ICustomStudentUpdateByRegNo
     37    iface_bymatricnumber = ICustomStudentUpdateByMatricNo
  • main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py

    r8502 r8582  
    382382
    383383    """
     384
     385class ICustomStudentUpdateByRegNo(ICustomStudent):
     386    """Representation of a student. Skip regular reg_number validation.
     387
     388    """
     389    reg_number = schema.TextLine(
     390        title = _(u'Registration Number'),
     391        required = False,
     392        )
     393
     394class ICustomStudentUpdateByMatricNo(ICustomStudent):
     395    """Representation of a student. Skip regular matric_number validation.
     396
     397    """
     398    matric_number = schema.TextLine(
     399        title = _(u'Matriculation Number'),
     400        required = False,
     401        )
Note: See TracChangeset for help on using the changeset viewer.