Changeset 2846 for WAeUP_SRP/base
- Timestamp:
- 3 Dec 2007, 21:53:29 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2779 r2846 1630 1630 ) 1631 1631 }, 1632 'StudentStudyLevel':1633 {'id': 'current_level',1634 'title': '',1635 'wf_transition_return': 'open',1636 'wf_transition_admit': 'remain',1637 'fields':1638 ('verdict',1639 'session',1640 )1641 },1632 # 'StudentStudyLevel': 1633 # {'id': 'current_level', 1634 # 'title': '', 1635 # 'wf_transition_return': 'open', 1636 # 'wf_transition_admit': 'remain', 1637 # 'fields': 1638 # ('verdict', 1639 # 'session', 1640 # ) 1641 # }, 1642 1642 'PaymentsFolder': 1643 1643 {'id': 'payments', … … 1748 1748 #import pdb;pdb.set_trace() 1749 1749 any_change = False 1750 #special treatment for StudentStudyLevel 1751 d['verdict'] = mapping.get('current_verdict','') 1752 d['session'] = mapping.get('current_session','') 1753 current_level = mapping.get('current_level','') 1754 while d['session'] and d['verdict'] and current_level: 1755 sub_obj = getattr(student_obj,'study_course',None) 1756 if sub_obj is None: 1757 break 1758 level_obj = getattr(sub_obj,current_level,None) 1759 if level_obj is None: 1760 break 1761 any_change = True 1762 level_obj.getContent().edit(mapping = d) 1763 try: 1764 wftool.doActionFor(level_obj,'close') 1765 except: 1766 pass 1767 break 1750 1768 for pt in f2t.keys(): 1751 1769 if pt == "StudentApplication": … … 1753 1771 if mapping.get('sex'): 1754 1772 d['jamb_sex'] = 'F' 1755 #special treatment for StudentStudyLevel1756 elif pt == "StudentStudyLevel":1757 d['verdict'] = mapping.get('current_verdict','')1758 d['session'] = mapping.get('current_session','')1759 current_level = mapping.get('current_level','')1760 while d['session'] and d['verdict'] and current_level:1761 sub_obj = getattr(student_obj,'study_course',None)1762 if sub_obj is None:1763 break1764 level_obj = getattr(sub_obj,current_level,None)1765 if level_obj is None:1766 break1767 any_change = True1768 level_obj.getContent().edit(mapping = d)1769 try:1770 wftool.doActionFor(level_obj,'close')1771 except:1772 pass1773 break1774 1773 intersect = set(f2t[pt]['fields']).intersection(set(editable_keys)) 1775 1774 if intersect and pt not in ('StudentStudyLevel',):
Note: See TracChangeset for help on using the changeset viewer.