Ignore:
Timestamp:
10 Sep 2012, 11:05:07 (12 years ago)
Author:
uli
Message:

Merge changes from trunk, r8786-HEAD

Location:
main/waeup.kofa/branches/uli-async-update
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-async-update

  • main/waeup.kofa/branches/uli-async-update/src/waeup/kofa/students/interfaces.py

    r9004 r9169  
    4343    def getValues(self, context):
    4444        verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT
    45         return verdicts_dict.keys()
     45        return sorted(verdicts_dict.keys())
    4646
    4747    def getToken(self, context, value):
     
    5050    def getTitle(self, context, value):
    5151        verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT
     52        if value != '0':
     53            return verdicts_dict[value] + ' (%s)' % value
    5254        return verdicts_dict[value]
    5355
     
    6567        """
    6668
    67     def setPaymentDetails(category, student):
     69    def setPaymentDetails(category, student, previous_session=None,
     70            previous_level=None,):
    6871        """Create Payment object and set the payment data of a student for
    6972        the payment category specified.
     
    151154    faccode = Attribute('The faculty code of any chosen study course')
    152155    current_session = Attribute('The current session of the student')
     156    current_level = Attribute('The current level of the student')
    153157    current_mode = Attribute('The current mode of the student')
    154158    fullname = Attribute('All name parts separated by hyphens')
    155159    display_fullname = Attribute('The fullname of an applicant')
     160    is_postgrad = Attribute('True if postgraduate student')
     161
     162    suspended = schema.Bool(
     163        title = _(u'Account suspended'),
     164        default = False,
     165        required = False,
     166        )
    156167
    157168    student_id = schema.TextLine(
     
    198209        title = _(u'PWD Activation Code'),
    199210        required = False,
    200         readonly = True,
     211        readonly = False,
    201212        )
    202213
     
    212223        )
    213224
     225    def transfer(certificate, current_session,
     226        current_level, current_verdict):
     227        """ Creates a new studycourse and backups the old one.
     228
     229        """
     230
    214231class IUGStudentClearance(IKofaObject):
    215232    """Representation of undergraduate student clearance data.
     
    225242        title = _(u'Clearance form locked'),
    226243        default = False,
     244        required = False,
    227245        )
    228246
     
    230248        title = _(u'CLR Activation Code'),
    231249        required = False,
    232         readonly = True,
     250        readonly = False,
    233251        )
    234252
     
    288306    login for the the first time.
    289307    """
    290     reg_number = schema.TextLine(
    291         title = u'Registration Number',
     308    number = schema.TextLine(
     309        title = _(u'Registr. or Matric. Number'),
    292310        required = True,
    293311        )
     
    346364        title = _(u'Current Verdict'),
    347365        source = VerdictSource(),
    348         default = 'NY',
     366        default = '0',
    349367        required = False,
    350368        )
     
    353371        title = _(u'Previous Verdict'),
    354372        source = VerdictSource(),
    355         default = 'NY',
    356         required = False,
    357         )
     373        default = '0',
     374        required = False,
     375        )
     376
     377class IStudentStudyCourseTransfer(IStudentStudyCourse):
     378    """An student transfers.
     379
     380    """
     381
     382    certificate = schema.Choice(
     383        title = _(u'Certificate'),
     384        source = CertificateSource(),
     385        required = True,
     386        )
     387
     388    current_level = schema.Choice(
     389        title = _(u'Current Level'),
     390        source = StudyLevelSource(),
     391        required = True,
     392        readonly = False,
     393        )
     394
     395
     396IStudentStudyCourseTransfer['certificate'].order = IStudentStudyCourse[
     397    'certificate'].order
     398IStudentStudyCourseTransfer['current_level'].order = IStudentStudyCourse[
     399    'current_level'].order
    358400
    359401class IStudentVerdictUpdate(IKofaObject):
     
    385427    """
    386428    level = Attribute('The level code')
    387     validation_date = Attribute('The date of validation')
    388     validated_by = Attribute('User Id of course adviser')
    389429
    390430    level_session = schema.Choice(
    391431        title = _(u'Session'),
    392432        source = academic_sessions_vocab,
    393         required = True,
     433        required = False,
    394434        )
    395435
     
    397437        title = _(u'Verdict'),
    398438        source = VerdictSource(),
    399         default = 'NY',
    400         required = False,
    401         )
    402 
    403     def addCourseTicket(courseticket):
     439        default = '0',
     440        required = False,
     441        )
     442
     443    validated_by = schema.TextLine(
     444        title = _(u'Validated by'),
     445        default = None,
     446        required = False,
     447        )
     448
     449    validation_date = schema.Datetime(
     450        title = _(u'Validation Date'),
     451        required = False,
     452        readonly = False,
     453        )
     454
     455    def addCourseTicket(ticket, course):
    404456        """Add a course ticket object.
    405457        """
     
    520572    """
    521573
     574    p_current = schema.Bool(
     575        title = _(u'Current Session Payment'),
     576        default = True,
     577        required = False,
     578        )
     579
    522580    p_level = schema.Int(
    523581        title = _(u'Payment Level'),
     
    543601IStudentOnlinePayment['p_level'].order = IStudentOnlinePayment[
    544602    'p_session'].order
     603
     604class IStudentPreviousPayment(IOnlinePayment):
     605    """An interface for adding previous session payments.
     606
     607    """
     608
     609    p_session = schema.Choice(
     610        title = _(u'Payment Session'),
     611        source = academic_sessions_vocab,
     612        required = True,
     613        )
     614
     615    p_level = schema.Choice(
     616        title = _(u'Payment Level'),
     617        source = StudyLevelSource(),
     618        required = True,
     619        )
    545620
    546621class ICSVStudentExporter(ICSVExporter):
Note: See TracChangeset for help on using the changeset viewer.