Changeset 17997 for main/kofacustom.unidel/trunk
- Timestamp:
- 29 Jan 2025, 16:10:23 (39 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/export.py
r16721 r17997 18 18 """Exporters for student related stuff. 19 19 """ 20 from waeup.kofa.students.export import DataForLecturerExporter 20 21 from kofacustom.unidel.students.interfaces import ( 21 22 ICustomStudent, … … 74 75 'student_id','state','current_session') 75 76 77 class CustomDataForLecturerExporter(DataForLecturerExporter): 78 """The Data for Lecturer Exporter searches for students in the course 79 tickets catalog and exports those course tickets which belong to the 80 given course code, meet level and session passed through at the 81 same time, and which are editable by lecturers (disabled on 10/03/21). 82 This exporter can only be called at course level in the academic section. 83 """ 84 85 fields = ('matric_number', 'student_id', 'display_fullname', 86 'faccode', 'certcode', 'state', 87 'level', 'code', 'level_session', 'score') 88 89 def mangle_value(self, value, name, context=None): 90 """The mangler determines the student's id and fullname. 91 """ 92 if context is not None: 93 student = context.student 94 if name in ('matric_number', 95 'reg_number', 96 'student_id', 97 'display_fullname', 98 'faccode', 99 'certcode', 100 'state',) and student is not None: 101 value = getattr(student, name, None) 102 return super( 103 DataForLecturerExporter, self).mangle_value( 104 value, name, context=context) 105
Note: See TracChangeset for help on using the changeset viewer.