Changeset 10033 for main/waeup.kofa/trunk/src
- Timestamp:
- 17 Mar 2013, 14:45:18 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/webservices.py
r10030 r10033 109 109 """ 110 110 return u'0.1' 111 112 @grok.require('waeup.xmlrpc')113 def get_student_id(self, reg_number=None):114 """Get the id of a student with registration number `reg_number`.115 116 Returns the student id as string if successful, ``None`` else.117 """118 if reg_number is not None:119 cat = getUtility(ICatalog, name='students_catalog')120 result = list(121 cat.searchResults(reg_number=(reg_number, reg_number),122 _limit=1))123 if not len(result):124 return None125 return result[0].student_id126 return None
Note: See TracChangeset for help on using the changeset viewer.