Changeset 16831 for main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
- Timestamp:
- 24 Feb 2022, 10:23:10 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r16827 r16831 415 415 """ 416 416 grok.name('studentstudycourses') 417 418 fields = tuple(sorted(iface_names(IStudentStudyCourse))) + ('student_id',) 417 previous = 0 418 419 fields = tuple(sorted(iface_names(IStudentStudyCourse))) + ( 420 'student_id', 'previous') 419 421 title = _(u'Student Study Courses (Data Backup)') 420 422 … … 431 433 student = context.student 432 434 value = getattr(student, name, None) 435 if name == 'previous': 436 return self.previous 433 437 return super( 434 438 StudentStudyCourseExporter, self).mangle_value( … … 440 444 """ 441 445 grok.name('studentstudycourses_1') 442 446 previous = 1 443 447 title = _(u'First Student Study Courses (Data Backup)') 444 448 … … 451 455 """ 452 456 grok.name('studentstudycourses_2') 453 457 previous = 2 454 458 title = _(u'Second Student Study Courses (Data Backup)') 455 459 … … 465 469 """ 466 470 grok.name('studentstudylevels') 471 previous = 0 467 472 468 473 fields = tuple(sorted(iface_names( 469 474 IStudentStudyLevel))) + ( 470 'student_id', 'number_of_tickets','certcode' )475 'student_id', 'number_of_tickets','certcode', 'previous') 471 476 title = _(u'Student Study Levels (Data Backup)') 472 477 … … 480 485 student = context.student 481 486 value = getattr(student, name, None) 487 if name == 'previous': 488 return self.previous 482 489 return super( 483 490 StudentStudyLevelExporter, self).mangle_value( … … 489 496 """ 490 497 grok.name('studentstudylevels_1') 491 498 previous = 1 492 499 title = _(u'First Course Student Study Levels (Data Backup)') 493 500 … … 500 507 """ 501 508 grok.name('studentstudylevels_2') 502 509 previous = 2 503 510 title = _(u'Second Course Student Study Levels (Data Backup)') 504 511 … … 524 531 fields = tuple(sorted(iface_names(ICourseTicket) + 525 532 ['level', 'code', 'level_session'])) + ('student_id', 526 'certcode', 'display_fullname' )533 'certcode', 'display_fullname', 'previous') 527 534 title = _(u'Course Tickets (Data Backup)') 535 previous = 0 528 536 529 537 def filter_func(self, x, **kw): … … 537 545 if name in ('student_id', 'display_fullname') and student is not None: 538 546 value = getattr(student, name, None) 547 if name == 'previous': 548 return self.previous 539 549 return super( 540 550 CourseTicketExporter, self).mangle_value( … … 546 556 """ 547 557 grok.name('coursetickets_1') 548 558 previous = 1 549 559 title = _(u'First Course Course Tickets (Data Backup)') 550 560 … … 557 567 """ 558 568 grok.name('coursetickets_2') 559 569 previous = 2 560 570 title = _(u'Second Course Course Tickets (Data Backup)') 561 571
Note: See TracChangeset for help on using the changeset viewer.