Changeset 17915 for main/waeup.uniben/trunk/src/waeup
- Timestamp:
- 6 Sep 2024, 14:11:04 (4 months ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/export.py
r17905 r17915 192 192 MedicalHistoryExporter, self).mangle_value( 193 193 value, name, context=context) 194 195 def get_routingslip_exists(students, **kw): 196 """Get students with outstanding certificate courses. 197 """ 198 students_with_slip = [] 199 for student in students: 200 file_id = IFileStoreNameChooser(student).chooseName( 201 attr='routingslip.pdf') 202 os_path = getUtility(IExtFileStore)._pathFromFileID(file_id) 203 if os.path.exists(os_path): 204 students_with_slip.append(student) 205 return students_with_slip 206 207 class RoutingSlipExporter(grok.GlobalUtility, StudentExporterBase): 208 """ 209 """ 210 grok.name('routingslip') 211 212 fields = ('student_id',) 213 title = 'Routing Slip Exists' 214 215 def filter_func(self, x, **kw): 216 return get_routingslip_exists(x, **kw) 217 218 #def mangle_value(self, value, name, context=None): 219 # if name == 'routing_slip': 220 # file_id = IFileStoreNameChooser(context).chooseName( 221 # attr='routingslip.pdf') 222 # os_path = getUtility(IExtFileStore)._pathFromFileID(file_id) 223 # if not os.path.exists(os_path): 224 # value = None 225 # else: 226 # value = '1' 227 # return super( 228 # RoutingSlipExporter, self).mangle_value( 229 # value, name, context=context) 194 230 195 231 -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r17912 r17915 877 877 'trimmedpayments', 878 878 'medicalhistory', 879 'routingslip', 879 880 'nysc', 880 881 )
Note: See TracChangeset for help on using the changeset viewer.