Ignore:
Timestamp:
17 Sep 2006, 10:31:22 (18 years ago)
Author:
Henrik Bettermann
Message:

two syntax errors in data export modules corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Academics.py

    r526 r527  
    472472                    di['code'] = di['code'] or department.id
    473473                    di['review_state'] = self.portal_workflow.getInfoFor(department,'review_state','no_state')
    474                     export.append('"%(code)s","%(review_state)s","%(title)s","%(title_prefix)s","%(faculty_code)s""' % di)
     474                    export.append('"%(code)s","%(review_state)s","%(title)s","%(title_prefix)s","%(faculty_code)s"' % di)
    475475                    logger.info('exporting %s %s ' % (department.id, department.title))
    476476                except:
     
    503503            for department in faculty.objectValues():
    504504                di['department_code'] = department.id
    505                 for course in department.courses.objectValues(): 
     505                for course in department.courses.objectValues():
    506506                    course_d = course.getContent()
    507507                    try:
     
    542542        heading += '"n_core","nr_years","original_code","probation_credits",'
    543543        heading += '"promotion_credits","start_level","admin_status"'
    544         dataline = '"(code)s","%(review_state)s","%(title)s","%(faculty_code)s","%(department_code)s",'
     544        dataline = '"%(code)s","%(review_state)s","%(title)s","%(faculty_code)s","%(department_code)s",'
    545545        dataline += '"%(category)s","%(end_level)s","%(m_prefix)s","%(max_elect)s","%(max_pass)s",'
    546546        dataline += '"%(n_core)s","%(nr_years)s","%(original_code)s","%(probation_credits)s",'
     
    553553            for department in faculty.objectValues():
    554554                di['department_code'] = department.id
    555                 for certificate in department.certificates.objectValues(): 
     555                for certificate in department.certificates.objectValues():
    556556                    certificate_d = certificate.getContent()
    557557                    di['code'] = certificate_d.get('code',None)
     
    596596        heading += '"certificate_code","level","semester","core_or_elective"'
    597597        dataline = '"%(code)s","%(review_state)s","%(faculty_code)s","%(department_code)s",'
    598         dataline += '"%(certificate_code)s","%(level)s","%(semester)s","%(core_or_elective)s"' 
     598        dataline += '"%(certificate_code)s","%(level)s","%(semester)s","%(core_or_elective)s"'
    599599        export.append(heading)
    600600        #import pdb;pdb.set_trace()
     
    605605            for department in faculty.objectValues():
    606606                di['department_code'] = department.id
    607                 for certificate in department.certificates.objectValues(): 
     607                for certificate in department.certificates.objectValues():
    608608                    di['certificate_code'] = certificate.id
    609609                    for level in certificate.objectValues():
     
    612612                            semester = getattr(level,sem,None)
    613613                            if semester is not None:
    614                                 di['semester'] = semesters.index(sem) + 1 
     614                                di['semester'] = semesters.index(sem) + 1
    615615                                for course in semester.objectValues():
    616616                                    course_d = course.getContent()
     
    679679        except:
    680680            return "no Title for %s" % self.getId()
    681    
     681
    682682
    683683InitializeClass(StudyLevel)
Note: See TracChangeset for help on using the changeset viewer.