Changeset 725
- Timestamp:
- 19 Oct 2006, 21:44:48 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r723 r725 28 28 except: 29 29 return 0 30 31 def getFloat(s): 32 try: 33 return float(s) 34 except: 35 return 0.0 30 36 31 37 def getStudentByRegNo(self,reg_no): ###( … … 304 310 dcr['carry_level'] = result.get('CarryLevel') 305 311 dcr['grade'] = result.get('Grade') 306 #d['weight'] = result.get('Weight')312 dcr['weight'] = result.get('Weight') 307 313 dlev['verdict'] = result.get('Verdict') 308 #d['import_id'] = result.get('id')309 #gpa = result.get('GPA').replace(',','.')310 #d['gpa'] = float(gpa)314 dcr['import_id'] = result.get('id') 315 gpa = result.get('GPA').replace(',','.') 316 dlev['imported_gpa'] = getFloat(gpa) 311 317 cr.getContent().edit(mapping = dcr) 312 318 l.getContent().edit(mapping = dlev) -
WAeUP_SRP/trunk/profiles/default/layouts/student_study_level.xml
r486 r725 34 34 </property> 35 35 <property name="hidden_readonly_layout_modes"/> 36 <property name="decimals_number">2</property> 37 </widget> 38 <widget name="imported_gpa" meta_type="Float Widget"> 39 <property name="title">GPA</property> 40 <property name="fields"> 41 <element value="imported_gpa"/> 42 </property> 43 <property name="label">GPA(imported)</property> 44 <property name="label_edit">GPA(imported)</property> 45 <property name="readonly_layout_modes"> 46 <element value="edit"/> 47 <element value="create"/> 48 </property> 49 <property name="hidden_layout_modes"> 50 <element value="create"/> 51 </property> 52 <property name="hidden_readonly_layout_modes"/> 53 <property name="decimals_number">2</property> 36 54 </widget> 37 55 <widget name="session" meta_type="String Widget"> … … 79 97 </row> 80 98 <row> 99 <cell name="imported_gpa"/> 100 </row> 101 <row> 81 102 <cell name="verdict"/> 82 103 </row> -
WAeUP_SRP/trunk/profiles/default/schemas/student_study_level.xml
r486 r725 6 6 <field name="status" meta_type="CPS String Field"/> 7 7 <field name="verdict" meta_type="CPS String Field"/> 8 <field name="imported_gpa" meta_type="CPS Float Field"/> 8 9 </object> -
WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py
r724 r725 105 105 gpaf = (float(sum)/course_count) 106 106 gpa = "%4.2f" % gpaf 107 info['doc'].edit(mapping={'gpa': gpa })107 info['doc'].edit(mapping={'gpa': gpaf}) 108 108 info['first'] = first 109 109 info['second'] = second
Note: See TracChangeset for help on using the changeset viewer.