Changeset 1434 for WAeUP_SRP/trunk/skins/waeup_utilities
- Timestamp:
- 18 Feb 2007, 08:58:35 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelFromResults.py
r1409 r1434 39 39 line_count = 0 40 40 lines = [] 41 #from Products.zdb import set_trace;set_trace()42 41 res = scat() 43 42 for sbrain in res: … … 48 47 erg = context.results_import(matric_no=sbrain.matric_no) 49 48 if erg and erg[0].Level: 50 #lc = "N"51 49 level_res = erg[0].Level 52 50 everdict = erg[0].Verdict … … 54 52 #if level_cc == 0: 55 53 #lc = "-" 56 #if "%d00" % level_cc != level_res:57 54 lc = 100*level_cc - int(level_res) 58 55 verdict,elegible = context.getVerdict(everdict) 59 56 if elegible: 60 #lc = "S"61 57 level = "%d00" % (level_cc + 1) 62 #context.students_catalog.modifyRecord(id = sbrain.id,63 #level="",64 #verdict = "")58 context.students_catalog.modifyRecord(id = sbrain.id, 59 level="", 60 verdict = "") 65 61 while True: 66 62 student = getattr(students,sbrain.id,None) … … 72 68 if study_course is None: 73 69 break 74 #study_course.getContent().edit(mapping = {'current_level':level,75 #'current_verdict':verdict})76 #context.students_catalog.modifyRecord(id = sbrain.id,77 #level=level,78 #verdict=verdict)70 study_course.getContent().edit(mapping = {'current_level':level, 71 'current_verdict':verdict}) 72 context.students_catalog.modifyRecord(id = sbrain.id, 73 level=level, 74 verdict=verdict) 79 75 ec = "reg" 80 76 break 81 77 82 #rwrite(ec +"--"+ sbrain.id +"--"+ sbrain.matric_no +"--"+ old_level +"--"+ level +"<br />")83 78 s = '"%s","%s","%s","%s","%s","%s","%s","%s"' % (str(lc),ec, 84 79 sbrain.id, … … 90 85 #lines.append(s) 91 86 else: 92 #rwrite(ec +"--"+ sbrain.id +"--"+ sbrain.matric_no + "<br />")93 87 s = '"","%s","%s","%s","",""' % (ec,sbrain.id,sbrain.matric_no) 94 88 #lines.append(s)
Note: See TracChangeset for help on using the changeset viewer.