Changeset 393


Ignore:
Timestamp:
18 Aug 2006, 09:56:34 (18 years ago)
Author:
joachim
Message:

not_imported now better formatted,
student_records viewable.

Location:
WAeUP_SRP/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r382 r393  
    5151            certs[c.id] = c.getObject()
    5252        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)
    5454            sid = student.get('MatricNo')
    5555            certcode = makeCertificateCode(student.get('CourseMajor'))
    5656            s = studs.get(sid,None)
    5757            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'))
    5959                if not no_import:
    6060                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
    6161                    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')
    6262                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)
    6465                continue
    6566            if s is None:
     
    126127                    second_s.getContent().edit(mapping={'Title': 'Second Semester'})
    127128            else:
    128                 em = 'Faculty with ID %(MatricNo)s %(fullname)s already exists' % student
     129                em = 'Student with ID %(MatricNo)s %(fullname)s already exists\n' % student
    129130                if not no_import:
    130131                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
    131132                    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')
    132133                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()
    135137    ###)
    136138
  • WAeUP_SRP/trunk/profiles/default/types/Student.xml

    r362 r393  
    2828 </property>
    2929 <property name="layouts">
    30   <element value="waeup_common"/>
    3130  <element value="student"/>
    3231 </property>
Note: See TracChangeset for help on using the changeset viewer.