Changeset 287
- Timestamp:
- 5 Jul 2006, 11:05:12 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 141 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Academics.py
r282 r287 116 116 if not no_import: 117 117 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) 119 120 no_import.write('"%(Session)s","%(DeptCode)s","%(Description)s","%(FacultyCode)s"\n' % dep) 120 121 else: … … 166 167 no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w") 167 168 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) 168 170 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) 169 171 continue … … 175 177 logger.info("invalid course_code %(course_id)s renaming to %(tid)s" % vars()) 176 178 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 = tid181 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 = tid179 ## 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 185 187 elif len(course_id) != 6: 186 188 logger.info("invalid course_code %(CourseCode)s" % course) … … 188 190 no_import = open("%s/import/%s_not_imported.csv" % (i_home,name),"w") 189 191 no_import.write('"CourseCode","Description","Credits","Dept","Semester","Session","PassMark","CourseKey","Category","AdmStatus"') 192 no_import.write("invalid course_code %(CourseCode)s\n" % course) 190 193 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) 191 194 continue … … 218 221 """install Universityspecific Certificates from CSV values""" 219 222 #return 223 name = 'certificates' 224 no_import = False 220 225 logger = logging.getLogger('loadcertificates') 221 226 try: … … 236 241 if facid not in f_ids: 237 242 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) 238 248 continue 239 249 if not deps.has_key(depid): 240 250 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) 241 256 continue 242 257 certificate_id = "%(category)s_%(Admstatus)s_%(Dept)s" % certificate
Note: See TracChangeset for help on using the changeset viewer.