- Timestamp:
- 19 Jun 2015, 15:36:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r13076 r13077 149 149 """A collection of methods which are subject to customization. 150 150 """ 151 152 151 APP_TYPES_DICT = Attribute('dict of application types') 153 152 … … 169 168 170 169 class IApplicantsRoot(IKofaObject, IContainer): 171 """A container for university applicants containers. 172 """ 170 """A container for applicants containers. 171 """ 172 description_dict = Attribute('Language translation dictionary with values in HTML format') 173 local_roles = Attribute('List of local role names') 174 logger_name = Attribute('Name of the logger') 175 logger_filename = Attribute('Name of the logger file') 173 176 174 177 description = schema.Text( … … 182 185 ) 183 186 184 description_dict = Attribute(185 """Content as language dictionary with values in HTML format.""")186 187 187 class IApplicantsContainer(IKofaObject): 188 """An applicants container contains university applicants. 189 190 """ 188 """An applicants container contains applicants. 189 """ 190 statistics = Attribute('Applicant counts') 191 expired = Attribute('True if application has started but not ended') 192 193 description_dict = Attribute('Language translation dictionary with values in HTML format') 194 local_roles = Attribute('List of local role names') 195 191 196 192 197 code = schema.TextLine( … … 246 251 ) 247 252 248 description_dict = Attribute(249 """Content as language dictionary with values in HTML format.""")250 251 253 startdate = schema.Datetime( 252 254 title = _(u'Application Start Date'), … … 285 287 ) 286 288 287 def archive(id=None): 288 """Create on-dist archive of applicants stored in this term. 289 290 If id is `None`, all applicants are archived. 291 292 If id contains a single id string, only the respective 293 applicants are archived. 294 295 If id contains a list of id strings all of the respective 296 applicants types are saved to disk. 297 """ 298 299 def clear(id=None, archive=True): 300 """Remove applicants of type given by 'id'. 301 302 Optionally archive the applicants. 303 304 If id is `None`, all applicants are archived. 305 306 If id contains a single id string, only the respective 307 applicants are archived. 308 309 If id contains a list of id strings all of the respective 310 applicant types are saved to disk. 311 312 If `archive` is ``False`` none of the archive-handling is done 313 and respective applicants are simply removed from the 314 database. 289 def addApplicant(applicant): 290 """Add an applicant. 315 291 """ 316 292 317 293 def writeLogMessage(view, comment): 318 """Adds an INFO message to the log file 294 """Add an INFO message to the log file. 295 """ 296 297 def traverse(name): 298 """Deliver appropriate containers. 319 299 """ 320 300 … … 342 322 343 323 class IApplicantBaseData(IApplicantBase): 344 """The data for an applicant. 345 346 This is a base interface with no field 324 """This is a base interface of an applicant with no field 347 325 required. For use with processors, forms, etc., please use one of 348 326 the derived interfaces below, which set more fields to required 349 327 state, depending on use-case. 350 328 """ 351 352 329 history = Attribute('Object history, a list of messages') 353 330 state = Attribute('The application state of an applicant') … … 368 345 readonly = False, 369 346 ) 347 370 348 reg_number = TextLineChoice( 371 349 title = _(u'Registration Number'), … … 374 352 source = contextual_reg_num_source, 375 353 ) 376 #access_code = schema.TextLine( 377 # title = u'Activation Code', 378 # required = False, 379 # readonly = True, 380 # ) 354 381 355 firstname = schema.TextLine( 382 356 title = _(u'First Name'), 383 357 required = True, 384 358 ) 359 385 360 middlename = schema.TextLine( 386 361 title = _(u'Middle Name'), 387 362 required = False, 388 363 ) 364 389 365 lastname = schema.TextLine( 390 366 title = _(u'Last Name (Surname)'), 391 367 required = True, 392 368 ) 369 393 370 date_of_birth = FormattedDate( 394 371 title = _(u'Date of Birth'), 395 372 required = False, 396 #date_format = u'%d/%m/%Y', # Use grok-instance-wide default397 373 show_year = True, 398 374 ) 375 399 376 sex = schema.Choice( 400 377 title = _(u'Sex'), … … 402 379 required = True, 403 380 ) 381 404 382 email = schema.ASCIILine( 405 383 title = _(u'Email Address'), … … 407 385 constraint=validate_email, 408 386 ) 387 409 388 phone = PhoneNumber( 410 389 title = _(u'Phone'), … … 412 391 required = False, 413 392 ) 393 414 394 course1 = schema.Choice( 415 395 title = _(u'1st Choice Course of Study'), … … 417 397 required = True, 418 398 ) 399 419 400 course2 = schema.Choice( 420 401 title = _(u'2nd Choice Course of Study'), … … 422 403 required = False, 423 404 ) 405 424 406 #school_grades = schema.List( 425 407 # title = _(u'School Grades'), … … 456 438 457 439 class IApplicant(IApplicantBaseData): 458 """An applicant. 459 460 This is basically the applicant base data. Here we repeat the 440 """This is basically the applicant base data. Here we repeat the 461 441 fields from base data if we have to set the `required` attribute 462 442 to True (which is the default). … … 473 453 474 454 class ISpecialApplicant(IApplicantBase): 475 """A special applicant. 476 477 This reduced interface is for former students or students who are not 455 """This reduced interface is for former students or students who are not 478 456 student users of the portal but have to pay supplementary fees. 479 457 … … 482 460 only 'customize' fields. 483 461 """ 484 485 462 history = Attribute('Object history, a list of messages') 486 463 state = Attribute('The application state of an applicant') … … 557 534 558 535 class IApplicantEdit(IApplicant): 559 """ An applicant interface for editing.536 """This is an applicant interface for editing. 560 537 561 538 Here we can repeat the fields from base data and set the … … 573 550 constraint=validate_email, 574 551 ) 552 575 553 course1 = schema.Choice( 576 554 title = _(u'1st Choice Course of Study'), … … 578 556 required = True, 579 557 ) 558 580 559 course2 = schema.Choice( 581 560 title = _(u'2nd Choice Course of Study'), … … 583 562 required = False, 584 563 ) 564 585 565 course_admitted = schema.Choice( 586 566 title = _(u'Admitted Course of Study'), … … 589 569 readonly = True, 590 570 ) 571 591 572 notice = schema.Text( 592 573 title = _(u'Notice'), … … 599 580 600 581 class IApplicantUpdateByRegNo(IApplicant): 601 """Representation of an applicant. 602 603 Skip regular reg_number validation if reg_number is used for finding 582 """Skip regular reg_number validation if reg_number is used for finding 604 583 the applicant object. 605 584 """ … … 610 589 611 590 class IApplicantRegisterUpdate(IApplicant): 612 """Representation of an applicant for first-time registration. 613 591 """This is a representation of an applicant for first-time registration. 614 592 This interface is used when applicants use the registration page to 615 593 update their records. … … 643 621 def doAfterApplicantPayment(): 644 622 """Process applicant after payment was made. 645 646 623 """ 647 624 648 625 def doAfterApplicantPaymentApproval(): 649 626 """Process applicant after payment was approved. 650 651 627 """ 652 628 653 629 def approveApplicantPayment(): 654 630 """Approve payment and process applicant. 655 656 """ 631 """
Note: See TracChangeset for help on using the changeset viewer.