Changeset 11484
- Timestamp:
- 12 Mar 2014, 22:14:18 (11 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r11483 r11484 4 4 1.0.1dev (unreleased) 5 5 ===================== 6 7 * Add display_fullname column to CourseTicketExporter (requested by Uniben). 6 8 7 9 * Do also export student and course ticket data of students on probation. -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r11483 r11484 275 275 #: Fieldnames considered by this exporter 276 276 fields = tuple(sorted(iface_names(ICourseTicket) + 277 ['level', 'code', 'level_session'])) + ('student_id', 'certcode') 277 ['level', 'code', 'level_session'])) + ('student_id', 278 'certcode', 'display_fullname') 278 279 279 280 #: The title under which this exporter will be displayed … … 288 289 if context is not None: 289 290 student = context.student 290 if name == 'student_id'and student is not None:291 if name in ('student_id', 'display_fullname') and student is not None: 291 292 value = getattr(student, name, None) 292 if name == 'level':293 value = getattr(context, 'level', lambda: None)294 if name == 'level_session':295 value = getattr(context, 'level_session', lambda: None)293 #if name == 'level': 294 # value = getattr(context, 'level', lambda: None) 295 #if name == 'level_session': 296 # value = getattr(context, 'level_session', lambda: None) 296 297 return super( 297 298 CourseTicketExporter, self).mangle_value( -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r11483 r11484 525 525 result, 526 526 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 527 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 528 '0,0,,,,,,,0,,,,,,\r\n' 527 'mandatory,passmark,score,semester,title,student_id,certcode,' 528 'display_fullname\r\n' 529 '0,0,,,,,,,0,,,,,,,\r\n' 529 530 ) 530 531 return … … 543 544 result, 544 545 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 545 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 546 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1\r\n' 546 'mandatory,passmark,score,semester,title,student_id,certcode,' 547 'display_fullname\r\n' 548 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,' 549 'Anna M. Tester\r\n' 547 550 ) 548 551 return … … 558 561 result, 559 562 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 560 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 561 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1\r\n' 563 'mandatory,passmark,score,semester,title,student_id,certcode,' 564 'display_fullname\r\n' 565 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,' 566 'Anna M. Tester\r\n' 562 567 ) 563 568 return … … 572 577 result, 573 578 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 574 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 575 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1\r\n' 579 'mandatory,passmark,score,semester,title,student_id,certcode,' 580 'display_fullname\r\n' 581 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,' 582 'Anna M. Tester\r\n' 576 583 ) 577 584 return … … 590 597 result, 591 598 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 592 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 593 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1\r\n' 599 'mandatory,passmark,score,semester,title,student_id,certcode,' 600 'display_fullname\r\n' 601 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,' 602 'Anna M. Tester\r\n' 594 603 ) 595 604 # if the coursetickets catalog is used to filter students … … 602 611 result, 603 612 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 604 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 605 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1\r\n' 613 'mandatory,passmark,score,semester,title,student_id,certcode,' 614 'display_fullname\r\n' 615 '1,1,CRS1,100,DEP1,FAC1,100,2012,0,100,,2,Course 1,A111111,CERT1,' 616 'Anna M. Tester\r\n' 606 617 ) 607 618 exporter.export_filtered( … … 611 622 result, 612 623 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 613 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 624 'mandatory,passmark,score,semester,title,student_id,certcode,' 625 'display_fullname\r\n' 614 626 ) 615 627 # Also tickets in probating levels are exported. Therefore … … 623 635 result, 624 636 'automatic,carry_over,code,credits,dcode,fcode,level,level_session,' 625 'mandatory,passmark,score,semester,title,student_id,certcode\r\n' 626 '1,1,CRS1,100,DEP1,FAC1,110,2012,0,100,,2,Course 1,A111111,CERT1\r\n' 637 'mandatory,passmark,score,semester,title,student_id,certcode,' 638 'display_fullname\r\n' 639 '1,1,CRS1,100,DEP1,FAC1,110,2012,0,100,,2,Course 1,A111111,CERT1,' 640 'Anna M. Tester\r\n' 627 641 ) 628 642 return
Note: See TracChangeset for help on using the changeset viewer.