Changeset 393 for WAeUP_SRP/trunk
- Timestamp:
- 18 Aug 2006, 09:56:34 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r382 r393 51 51 certs[c.id] = c.getObject() 52 52 for student in students: 53 logger.info('processing "%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s" ' % student)53 logger.info('processing "%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student) 54 54 sid = student.get('MatricNo') 55 55 certcode = makeCertificateCode(student.get('CourseMajor')) 56 56 s = studs.get(sid,None) 57 57 if certcode not in certs.keys(): 58 em = 'Certificate with ID %s %s not found ' % (certcode, student.get('CourseMajor'))58 em = 'Certificate with ID %s %s not found\n' % (certcode, student.get('CourseMajor')) 59 59 if not no_import: 60 60 no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w") 61 61 no_import.write('"MatricNo","EntryRegNo","CurrentSession","StudentLevel","fullname","FirstName","MiddleName","Lastname","FormerSurname","Sex","Nationality","State","LGA","PermanentAddress","PermanentAddressCity","CampusAddress","PhoneNumber","Emailaddress","Mode","CourseMajor","Faculty","Dept"\n') 62 62 logger.info(em) 63 no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"' % student) 63 no_import.write(em) 64 no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student) 64 65 continue 65 66 if s is None: … … 126 127 second_s.getContent().edit(mapping={'Title': 'Second Semester'}) 127 128 else: 128 em = ' Faculty with ID %(MatricNo)s %(fullname)s already exists' % student129 em = 'Student with ID %(MatricNo)s %(fullname)s already exists\n' % student 129 130 if not no_import: 130 131 no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w") 131 132 no_import.write('"MatricNo","EntryRegNo","CurrentSession","StudentLevel","fullname","FirstName","MiddleName","Lastname","FormerSurname","Sex","Nationality","State","LGA","PermanentAddress","PermanentAddressCity","CampusAddress","PhoneNumber","Emailaddress","Mode","CourseMajor","Faculty","Dept"\n') 132 133 logger.info(em) 133 no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"' % student) 134 return self.students.folder_contents() 134 no_import.write(em) 135 no_import.write('"%(MatricNo)s","%(EntryRegNo)s","%(CurrentSession)s","%(StudentLevel)s","%(fullname)s","%(FirstName)s","%(MiddleName)s","%(Lastname)s","%(FormerSurname)s","%(Sex)s","%(Nationality)s","%(State)s","%(LGA)s","%(PermanentAddress)s","%(PermanentAddressCity)s","%(CampusAddress)s","%(PhoneNumber)s","%(Emailaddress)s","%(Mode)s","%(CourseMajor)s","%(Faculty)s","%(Dept)s"\n' % student) 136 return self.students.academics_contents() 135 137 ###) 136 138 -
WAeUP_SRP/trunk/profiles/default/types/Student.xml
r362 r393 28 28 </property> 29 29 <property name="layouts"> 30 <element value="waeup_common"/>31 30 <element value="student"/> 32 31 </property>
Note: See TracChangeset for help on using the changeset viewer.