- Timestamp:
- 24 Nov 2007, 17:25:11 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2751 r2753 1612 1612 ) 1613 1613 }, 1614 1614 'StudentStudyLevel': 1615 {'id': 'current_level', 1616 'title': '', 1617 'wf_transition_return': 'open', 1618 'wf_transition_admit': 'remain', 1619 'fields': 1620 ('verdict', 1621 'session', 1622 ) 1623 }, 1615 1624 'PaymentsFolder': 1616 1625 {'id': 'payments', … … 1721 1730 any_change = False 1722 1731 for pt in f2t.keys(): 1723 if pt == " student_application":1732 if pt == "StudentApplication": 1724 1733 d['jamb_sex'] = 'M' 1725 1734 if mapping.get('sex'): 1726 1735 d['jamb_sex'] = 'F' 1736 #special treatment for StudentStudyLevel 1737 elif pt == "StudentStudyLevel": 1738 d['verdict'] = mapping.get('current_verdict','') 1739 d['session'] = mapping.get('current_session','') 1740 while d['session'] or d['verdict']: 1741 sub_obj = getattr(student_obj,'study_course',None) 1742 if sub_obj is None: 1743 break 1744 level = getattr(sub_obj,mapping.get('current_level',None)) 1745 if level is None: 1746 break 1747 level.getContent().edit(mapping = d) 1748 break 1727 1749 intersect = set(f2t[pt]['fields']).intersection(set(editable_keys)) 1728 if intersect: 1729 sub_obj = getattr(student_obj,f2t[pt]['id'],None) 1750 if intersect and pt not in ('StudentStudyLevel',): 1751 object_id = f2t[pt]['id'] 1752 sub_obj = getattr(student_obj,object_id,None) 1730 1753 if sub_obj is None: 1731 1754 try: 1732 student_obj.invokeFactory(pt, f2t[pt]['id'])1755 student_obj.invokeFactory(pt,object_id) 1733 1756 except: 1734 1757 continue 1735 sub_obj = getattr(student_obj,f2t[pt]['id']) 1736 d['Title'] = f2t[pt]['title'] 1758 sub_obj = getattr(student_obj,object_id) 1759 if f2t[pt]['title'] != '': 1760 d['Title'] = f2t[pt]['title'] 1737 1761 sub_doc = sub_obj.getContent() 1738 1762 for field in intersect:
Note: See TracChangeset for help on using the changeset viewer.