Changeset 1386
- Timestamp:
- 1 Feb 2007, 22:31:03 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r1350 r1386 551 551 study_course = student.study_course 552 552 dsc = {} 553 from_certificate = ['title',554 'max_elect',555 'max_pass',556 'n_core',557 'nr_years',558 'probation_credits',559 'promotion_credits',560 'start_level',561 ]562 for f in from_certificate:563 dsc[f] = getattr(cert_doc,f)564 dsc['faculty'] = jamb.get(csv_d['faculty'])565 dsc['department'] = jamb.get(csv_d['department'])553 #from_certificate = ['title', 554 # 'max_elect', 555 # 'max_pass', 556 # 'n_core', 557 # 'nr_years', 558 # 'probation_credits', 559 # 'promotion_credits', 560 # 'start_level', 561 # ] 562 #for f in from_certificate: 563 # dsc[f] = getattr(cert_doc,f) 564 #dsc['faculty'] = jamb.get(csv_d['faculty']) 565 #dsc['department'] = jamb.get(csv_d['department']) 566 566 catalog_entry['faculty'] = jamb.get(csv_d['faculty']) 567 567 catalog_entry['department'] = jamb.get(csv_d['department']) 568 568 catalog_entry['course'] = cert_id 569 catalog_entry['level'] = getattr(cert_doc,'start_level') 569 #catalog_entry['level'] = getattr(cert_doc,'start_level') 570 catalog_entry['level'] = '200' 570 571 dsc['study_course'] = cert_id 571 dsc['entry_session'] = jamb.get(csv_d['session']) 572 dsc['current_level'] = '200' 573 #dsc['entry_session'] = jamb.get(csv_d['session']) 572 574 study_course.getContent().edit(mapping=dsc) 573 575 self.students_catalog.addRecord(**catalog_entry) … … 773 775 study_course = student.study_course 774 776 dsc = {} 775 from_certificate = ['title',776 'max_elect',777 'max_pass',778 'n_core',779 'nr_years',780 'probation_credits',781 'promotion_credits',782 'start_level',783 ]784 for f in from_certificate:785 dsc[f] = getattr(cert_doc,f)786 dsc['faculty'] = jamb.get(csv_d['faculty'])787 dsc['department'] = jamb.get(csv_d['department'])777 #from_certificate = ['title', 778 # 'max_elect', 779 # 'max_pass', 780 # 'n_core', 781 # 'nr_years', 782 # 'probation_credits', 783 # 'promotion_credits', 784 # 'start_level', 785 # ] 786 #for f in from_certificate: 787 # dsc[f] = getattr(cert_doc,f) 788 #dsc['faculty'] = jamb.get(csv_d['faculty']) 789 #dsc['department'] = jamb.get(csv_d['department']) 788 790 catalog_entry['faculty'] = jamb.get(csv_d['faculty']) 789 791 catalog_entry['department'] = jamb.get(csv_d['department']) 790 792 catalog_entry['course'] = cert_id 791 catalog_entry['level'] = getattr(cert_doc,'start_level') 793 #catalog_entry['level'] = getattr(cert_doc,'start_level') 794 catalog_entry['level'] = '100' 792 795 dsc['study_course'] = cert_id 793 dsc['entry_session'] = jamb.get(csv_d['session']) 796 dsc['entry_level'] = '100' 797 #dsc['entry_session'] = jamb.get(csv_d['session']) 794 798 study_course.getContent().edit(mapping=dsc) 795 799 self.students_catalog.addRecord(**catalog_entry) … … 910 914 self.fixEntryModeForReturning(csv_file=head) 911 915 ###) 912 916 913 917 security.declareProtected(ModifyPortalContent,"fixEntryModeForReturning")###( 914 918 def fixEntryModeForReturning(self,csv_file=None): … … 1079 1083 no_import.append( format_error % student) 1080 1084 continue 1081 s = self.students_catalog(matric_no=matric_no)1082 if s:1083 level = "%s" % (int(student.get('Level')) + 100)1084 self.students_catalog.modifyRecord(id = s[0].id,1085 level=level)1085 #s = self.students_catalog(matric_no=matric_no) 1086 #if s: 1087 # level = "%s" % (int(student.get('Level')) + 100) 1088 # self.students_catalog.modifyRecord(id = s[0].id, 1089 # level=level) 1086 1090 1087 1091 regs.append(student.get('matric_no'))
Note: See TracChangeset for help on using the changeset viewer.