Changeset 7837
- Timestamp:
- 11 Mar 2012, 16:00:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r7828 r7837 80 80 ) 81 81 82 SUBJECTS = dict(math=_(u'Math'),83 bio=_(u'Biology'),84 eng=_(u'English'),85 )86 82 class SubjectSource(BasicSourceFactory): 83 87 84 def getValues(self): 88 return sorted(SUBJECTS.keys()) 85 subjects_dict = getUtility(IKofaUtils).getExamSubjectsDict() 86 return sorted(subjects_dict.keys()) 87 89 88 def getTitle(self, value): 90 return "%s:" % SUBJECTS.get(value, None) 91 92 GRADES = {'A':_(u'Very Good'), 93 'B':_(u'Good'), 94 'C':_(u'Satisfactory'), 95 'D':_(u'Sufficient'), 96 'E':_(u'Fail'), 97 } 89 subjects_dict = getUtility(IKofaUtils).getExamSubjectsDict() 90 return "%s:" % subjects_dict[value] 91 98 92 class GradeSource(BasicSourceFactory): 93 99 94 def getValues(self): 100 return sorted(GRADES.keys()) 95 grades_dict = getUtility(IKofaUtils).getExamGradesDict() 96 return sorted(grades_dict.keys()) 97 101 98 def getTitle(self, value): 102 return GRADES.get(value, None) 99 grades_dict = getUtility(IKofaUtils).getExamGradesDict() 100 return grades_dict[value] 103 101 104 102 # Define a valiation method for email addresses
Note: See TracChangeset for help on using the changeset viewer.