Changeset 287 for WAeUP_SRP


Ignore:
Timestamp:
5 Jul 2006, 11:05:12 (18 years ago)
Author:
joachim
Message:

=added cps_portlets and experimental theme

Location:
WAeUP_SRP/trunk
Files:
141 added
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Academics.py

    r282 r287  
    116116                if not no_import:
    117117                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
    118                     no_import.write('"Session","DeptCode","Description","FacultyCode"')
     118                    no_import.write('"Session","DeptCode","Description","FacultyCode"\n')
     119                no_import.write( "No Faculty with ID: %s\n" % fid)
    119120                no_import.write('"%(Session)s","%(DeptCode)s","%(Description)s","%(FacultyCode)s"\n' % dep)
    120121            else:
     
    166167                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
    167168                    no_import.write('"CourseCode","Description","Credits","Dept","Semester","Session","PassMark","CourseKey","Category","AdmStatus"\n')
     169                no_import.write("Dep %(Dept)s for Course %(CourseCode)s not found\n" % course)
    168170                no_import.write('"%(CourseCode)s","%(Description)s","%(Credits)s","%(Dept)s","%(Semester)s","%(Session)s","%(PassMark)s","%(CourseKey)s","%(Category)s","%(AdmStatus)s"\n' % course)
    169171                continue
     
    175177                logger.info("invalid course_code %(course_id)s renaming to %(tid)s" % vars())
    176178                course_id = tid
    177             elif course_id.startswith('DAIC'):
    178                 tid = course_id.replace('DAIC','DAC')
    179                 logger.info("invalid course_code %(course_id)s renaming to %(tid)s" % vars())
    180                 course_id = tid
    181             elif course_id.startswith('DAIM'):
    182                 tid = course_id.replace('DAIM','DAM')
    183                 logger.info("invalid course_code %(course_id)s renaming to %(tid)s" % vars())
    184                 course_id = tid
     179##            elif course_id.startswith('DAIC'):
     180##                tid = course_id.replace('DAIC','DAC')
     181##                logger.info("invalid course_code %(course_id)s renaming to %(tid)s" % vars())
     182##                course_id = tid
     183##            elif course_id.startswith('DAIM'):
     184##                tid = course_id.replace('DAIM','DAM')
     185##                logger.info("invalid course_code %(course_id)s renaming to %(tid)s" % vars())
     186##                course_id = tid
    185187            elif len(course_id) != 6:
    186188                logger.info("invalid course_code %(CourseCode)s" % course)
     
    188190                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
    189191                    no_import.write('"CourseCode","Description","Credits","Dept","Semester","Session","PassMark","CourseKey","Category","AdmStatus"')
     192                no_import.write("invalid course_code %(CourseCode)s\n" % course)
    190193                no_import.write('"%(CourseCode)s","%(Description)s","%(Credits)s","%(Dept)s","%(Semester)s","%(Session)s","%(PassMark)s","%(CourseKey)s","%(Category)s","%(AdmStatus)s"\n' % course)
    191194                continue
     
    218221        """install Universityspecific Certificates from CSV values"""
    219222        #return
     223        name = 'certificates'
     224        no_import = False
    220225        logger = logging.getLogger('loadcertificates')
    221226        try:
     
    236241            if facid not in f_ids:
    237242                logger.info('Faculty %(Faculty)s for %(CertCode)s %(Description)s not found' % certificate)
     243                if not no_import:
     244                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
     245                    no_import.write('"CertCode","Description","Faculty","MaxPass","MaxLoad","session","PromotionCredits","Probationcredits","StartLevel","endLevel","Nyears","Ncore","MaxElect","MPREFIX","Dept","Admstatus","category"\n')
     246                no_import.write('Faculty %(Faculty)s for %(CertCode)s %(Description)s not found\n' % certificate)
     247                no_import.write('"%(CertCode)s","%(Description)s","%(Faculty)s","%(MaxPass)s","%(MaxLoad)s","%(session)s","%(PromotionCredits)s","%(Probationcredits)s","%(StartLevel)s","%(endLevel)s","%(Nyears)s","%(Ncore)s","%(MaxElect)s","%(MPREFIX)s","%(Dept)s","%(Admstatus)s","%(category)s"\n' % certificate)
    238248                continue
    239249            if not deps.has_key(depid):
    240250                logger.info('Department %(Dept)s for %(CertCode)s %(Description)s not found' % certificate)
     251                if not no_import:
     252                    no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w")
     253                    no_import.write('"CertCode","Description","Faculty","MaxPass","MaxLoad","session","PromotionCredits","Probationcredits","StartLevel","endLevel","Nyears","Ncore","MaxElect","MPREFIX","Dept","Admstatus","category"\n')
     254                no_import.write('Department %(Dept)s for %(CertCode)s %(Description)s not found\n' % certificate)
     255                no_import.write('"%(CertCode)s","%(Description)s","%(Faculty)s","%(MaxPass)s","%(MaxLoad)s","%(session)s","%(PromotionCredits)s","%(Probationcredits)s","%(StartLevel)s","%(endLevel)s","%(Nyears)s","%(Ncore)s","%(MaxElect)s","%(MPREFIX)s","%(Dept)s","%(Admstatus)s","%(category)s"\n' % certificate)
    241256                continue
    242257            certificate_id = "%(category)s_%(Admstatus)s_%(Dept)s" % certificate
Note: See TracChangeset for help on using the changeset viewer.