- Timestamp:
- 10 Sep 2012, 11:05:07 (12 years ago)
- Location:
- main/waeup.kofa/branches/uli-async-update
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-async-update
- Property svn:mergeinfo changed
-
main/waeup.kofa/branches/uli-async-update/src/waeup/kofa/students/interfaces.py
r9004 r9169 43 43 def getValues(self, context): 44 44 verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT 45 return verdicts_dict.keys()45 return sorted(verdicts_dict.keys()) 46 46 47 47 def getToken(self, context, value): … … 50 50 def getTitle(self, context, value): 51 51 verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT 52 if value != '0': 53 return verdicts_dict[value] + ' (%s)' % value 52 54 return verdicts_dict[value] 53 55 … … 65 67 """ 66 68 67 def setPaymentDetails(category, student): 69 def setPaymentDetails(category, student, previous_session=None, 70 previous_level=None,): 68 71 """Create Payment object and set the payment data of a student for 69 72 the payment category specified. … … 151 154 faccode = Attribute('The faculty code of any chosen study course') 152 155 current_session = Attribute('The current session of the student') 156 current_level = Attribute('The current level of the student') 153 157 current_mode = Attribute('The current mode of the student') 154 158 fullname = Attribute('All name parts separated by hyphens') 155 159 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 ) 156 167 157 168 student_id = schema.TextLine( … … 198 209 title = _(u'PWD Activation Code'), 199 210 required = False, 200 readonly = True,211 readonly = False, 201 212 ) 202 213 … … 212 223 ) 213 224 225 def transfer(certificate, current_session, 226 current_level, current_verdict): 227 """ Creates a new studycourse and backups the old one. 228 229 """ 230 214 231 class IUGStudentClearance(IKofaObject): 215 232 """Representation of undergraduate student clearance data. … … 225 242 title = _(u'Clearance form locked'), 226 243 default = False, 244 required = False, 227 245 ) 228 246 … … 230 248 title = _(u'CLR Activation Code'), 231 249 required = False, 232 readonly = True,250 readonly = False, 233 251 ) 234 252 … … 288 306 login for the the first time. 289 307 """ 290 reg_number = schema.TextLine(291 title = u'Registration Number',308 number = schema.TextLine( 309 title = _(u'Registr. or Matric. Number'), 292 310 required = True, 293 311 ) … … 346 364 title = _(u'Current Verdict'), 347 365 source = VerdictSource(), 348 default = ' NY',366 default = '0', 349 367 required = False, 350 368 ) … … 353 371 title = _(u'Previous Verdict'), 354 372 source = VerdictSource(), 355 default = 'NY', 356 required = False, 357 ) 373 default = '0', 374 required = False, 375 ) 376 377 class 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 396 IStudentStudyCourseTransfer['certificate'].order = IStudentStudyCourse[ 397 'certificate'].order 398 IStudentStudyCourseTransfer['current_level'].order = IStudentStudyCourse[ 399 'current_level'].order 358 400 359 401 class IStudentVerdictUpdate(IKofaObject): … … 385 427 """ 386 428 level = Attribute('The level code') 387 validation_date = Attribute('The date of validation')388 validated_by = Attribute('User Id of course adviser')389 429 390 430 level_session = schema.Choice( 391 431 title = _(u'Session'), 392 432 source = academic_sessions_vocab, 393 required = True,433 required = False, 394 434 ) 395 435 … … 397 437 title = _(u'Verdict'), 398 438 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): 404 456 """Add a course ticket object. 405 457 """ … … 520 572 """ 521 573 574 p_current = schema.Bool( 575 title = _(u'Current Session Payment'), 576 default = True, 577 required = False, 578 ) 579 522 580 p_level = schema.Int( 523 581 title = _(u'Payment Level'), … … 543 601 IStudentOnlinePayment['p_level'].order = IStudentOnlinePayment[ 544 602 'p_session'].order 603 604 class 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 ) 545 620 546 621 class ICSVStudentExporter(ICSVExporter):
Note: See TracChangeset for help on using the changeset viewer.