Changeset 3039 for WAeUP_SRP/base
- Timestamp:
- 23 Jan 2008, 19:09:11 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r3036 r3039 1752 1752 security.declareProtected(ModifyPortalContent,'mass_create_student') ###( 1753 1753 def mass_create_student(self,mapping): 1754 "create a students recorddue import"1754 "create student records due import" 1755 1755 logger = logging.getLogger('WAeUPTool.mass_create_student') 1756 1756 students_folder = self.portal_url.getPortalObject().campus.students … … 1808 1808 def mass_edit_student(self,mapping): 1809 1809 wftool = self.portal_workflow 1810 "edit a students recorddue import"1810 "edit student records due import" 1811 1811 logger = logging.getLogger('WAeUPTool.mass_edit_student') 1812 1812 students_folder = self.portal_url.getPortalObject().campus.students … … 1924 1924 def mass_edit_verdict(self,mapping): 1925 1925 wftool = self.portal_workflow 1926 "edit a students verdict"1926 "edit student verdicts" 1927 1927 logger = logging.getLogger('WAeUPTool.mass_edit_verdict') 1928 1928 students_folder = self.portal_url.getPortalObject().campus.students … … 1958 1958 current_session = mapping.get('current_session','') 1959 1959 if current_session and student_record.session != current_session: 1960 return '','student_id: %s imported session %s does not match session %s' % (student_id,1960 return '','student_id: %s imported session %s does not match current_session %s' % (student_id, 1961 1961 current_session, 1962 1962 student_record.session) 1963 1963 1964 1964 current_level = mapping.get('current_level','') 1965 1965 if current_level and student_record.level != current_level: 1966 return '','student_id %s: imported level %s does not match level %s' % (student_id,1966 return '','student_id %s: imported level %s does not match current_level %s' % (student_id, 1967 1967 current_level, 1968 1968 student_record.level) 1969 1969 study_course_obj = getattr(student_obj,'study_course',None) 1970 1970 if study_course_obj is None: 1971 return '','student_id %s: no study_course -object' % student_id1971 return '','student_id %s: no study_course object' % student_id 1972 1972 level_obj = getattr(study_course_obj,current_level,None) 1973 1973 if level_obj is None: 1974 return '','student_id %s: no study_level -object for level %s' % (student_id,1974 return '','student_id %s: no study_level object for level %s' % (student_id, 1975 1975 current_level) 1976 1976 verdict = d['verdict'] = d['current_verdict'] = mapping.get('current_verdict','') … … 1978 1978 return '','student_id %s: verdict already set to %s' % (student_id, 1979 1979 verdict) 1980 1980 1981 1981 level_review_state = wftool.getInfoFor(level_obj,'review_state',None) 1982 1982 if level_review_state != "closed": 1983 1983 return '','student_id %s: level %s is not closed' % (student_id, 1984 1984 current_level) 1985 1985 1986 1986 study_course_obj.getContent().edit(mapping = d) 1987 1987 level_obj.getContent().edit(mapping = d)
Note: See TracChangeset for help on using the changeset viewer.