Changeset 16112 for main/waeup.kofa/trunk/src
- Timestamp:
- 9 Jun 2020, 06:40:21 (4 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py
r16110 r16112 262 262 result = server.get_grad_student('123', 'aa@aa.ng') 263 263 self.assertEqual(result, 264 [True, False ])264 [True, False, False]) 265 265 REQUEST_XML = """\ 266 266 <?xml version="1.0"?> … … 283 283 <value><array><data> 284 284 <value><boolean>1</boolean></value> 285 <value><boolean>0</boolean></value> 285 286 <value><boolean>0</boolean></value> 286 287 </data></array></value> -
main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py
r16110 r16112 24 24 from waeup.kofa.interfaces import ( 25 25 IUniversity, IExtFileStore, IFileStoreNameChooser, IKofaUtils, 26 GRADUATED )26 GRADUATED, TRANSREL) 27 27 from waeup.kofa.utils.helpers import get_fileformat, to_timezone 28 28 from waeup.kofa.students.catalog import StudentsQuery … … 166 166 @grok.require('waeup.Public') 167 167 def get_grad_student(self, identifier=None, email=None): 168 """ Does student record exist and is graduated student with correct169 email address?168 """Check if student record exist, check email address and 169 retrieve registration state. 170 170 """ 171 171 students = self.context['students'] … … 175 175 correct_email = False 176 176 has_graduated = False 177 transcript_released = False 177 178 if student.email == email: 178 179 correct_email = True 179 180 if student.state == GRADUATED: 180 181 has_graduated = True 181 return [correct_email, has_graduated] 182 if student.state == TRANSREL: 183 transcript_released = True 184 return [correct_email, has_graduated, transcript_released] 182 185 183 186 @grok.require('waeup.xmlrpc')
Note: See TracChangeset for help on using the changeset viewer.