Changeset 14012
- Timestamp:
- 4 Jul 2016, 05:03:17 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r14011 r14012 257 257 """A school grade entry. 258 258 """ 259 259 260 subject = schema.Choice( 260 261 title = _(u'Subject'), 261 262 source = SubjectSource(), 262 263 ) 264 263 265 grade = schema.Choice( 264 266 title = _(u'Grade'), … … 276 278 """A referee entry. 277 279 """ 280 email_sent = Attribute('True if email has been sent') 281 278 282 name = schema.TextLine( 279 283 title = _(u'Name'), … … 281 285 description = _(u'Name'), 282 286 ) 287 283 288 email = schema.ASCIILine( 284 289 title = _(u'Email Address'), -
main/waeup.kofa/trunk/src/waeup/kofa/refereeentries.py
r14011 r14012 40 40 email = FieldProperty(IRefereeEntry['email']) 41 41 42 def __init__(self, name=None, email=None ):42 def __init__(self, name=None, email=None, email_sent=False): 43 43 super(RefereeEntry, self).__init__() 44 44 if name is not None: … … 46 46 if email is not None: 47 47 self.email = email 48 self.email_sent = email_sent 49 if not email_sent == True: 50 self.email_sent = False 48 51 return 49 52 … … 68 71 """A string representation that can be used in exports. 69 72 70 Returned is a unicode string of format ``(u'<NAME>',u'<EMAIL>')``. 73 Returned is a unicode string of format 74 ``(u'<NAME>','<EMAIL>',<EMAILSENT>)``. 71 75 """ 72 return unicode((self.name, self.email ))76 return unicode((self.name, self.email, self.email_sent)) 73 77 74 78 @classmethod … … 85 89 i.e. use the `RefereeEntry` class, not an instance thereof. 86 90 """ 87 string = string.replace("u''", "None") 88 name, email = eval(string)89 return cls(name, email )91 string = string.replace("u''", "None").replace("''", "None") 92 name, email, email_sent = eval(string) 93 return cls(name, email, email_sent) 90 94 91 95
Note: See TracChangeset for help on using the changeset viewer.