Changeset 9925 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 30 Jan 2013, 09:08:39 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9924 r9925 160 160 view.context.writeLogMessage( 161 161 view,'added: %s|%s|%s' % ( 162 ticket.code, ticket. getLevel(), ticket.getLevelSession()))162 ticket.code, ticket.level, ticket.level_session)) 163 163 return True 164 164 -
main/waeup.kofa/trunk/src/waeup/kofa/students/catalog.py
r9843 r9925 131 131 grok.context(ICourseTicket) 132 132 133 level = index.Field(attribute=' getLevel')134 session = index.Field(attribute=' getLevelSession')133 level = index.Field(attribute='level') 134 session = index.Field(attribute='level_session') 135 135 code = index.Field(attribute='code') 136 136 -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r9859 r9925 265 265 value = getattr(student, name, None) 266 266 if name == 'level': 267 value = getattr(context, ' getLevel', lambda: None)()267 value = getattr(context, 'level', lambda: None) 268 268 if name == 'level_session': 269 value = getattr(context, ' getLevelSession', lambda: None)()269 value = getattr(context, 'level_session', lambda: None) 270 270 return super( 271 271 CourseTicketExporter, self).mangle_value( -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r9874 r9925 559 559 weight = Attribute('weight calculated from score') 560 560 removable_by_student = Attribute('Is student allowed to remove the ticket?') 561 level_session = Attribute('session of the level the ticket has been added to') 562 level = Attribute('id of the level the ticket has been added to') 561 563 562 564 title = schema.TextLine( … … 615 617 ) 616 618 617 def getLevel():618 """Returns the id of the level the ticket has been added to.619 """620 621 def getLevelSession():622 """Returns the session of the level the ticket has been added to.623 """624 619 625 620 class ICourseTicketAdd(IKofaObject): -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r9912 r9925 203 203 return self.__parent__.__parent__.__parent__.writeLogMessage(view, message) 204 204 205 def getLevel(self): 205 @property 206 def level(self): 206 207 """Returns the id of the level the ticket has been added to. 207 208 """ 208 # XXX: shouldn't that be an attribute?209 209 try: 210 210 return self.__parent__.level … … 212 212 return None 213 213 214 def getLevelSession(self): 214 @property 215 def level_session(self): 215 216 """Returns the session of the level the ticket has been added to. 216 217 """ 217 # XXX: shouldn't that be an attribute?218 218 try: 219 219 return self.__parent__.level_session
Note: See TracChangeset for help on using the changeset viewer.