Changeset 12104 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 1 Dec 2014, 14:43:16 (10 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
r12048 r12104 76 76 ) 77 77 from waeup.kofa.students.catalog import search, StudentQueryResultItem 78 from waeup.kofa.students.export import EXPORTER_NAMES79 78 from waeup.kofa.students.studylevel import StudentStudyLevel, CourseTicket 80 79 from waeup.kofa.students.vocabularies import StudyLevelSource … … 3180 3179 self.exporters = exporters 3181 3180 return 3182 for name in EXPORTER_NAMES: 3181 STUDENT_EXPORTER_NAMES = getUtility( 3182 IStudentsUtils).STUDENT_EXPORTER_NAMES 3183 for name in STUDENT_EXPORTER_NAMES: 3183 3184 util = getUtility(ICSVExporter, name=name) 3184 3185 exporters.append((util.title, name),) -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r12079 r12104 33 33 from waeup.kofa.utils.helpers import iface_names, to_timezone 34 34 35 #: A tuple containing all exporter names referring to students or36 #: subobjects thereof.37 EXPORTER_NAMES = ('students', 'studentstudycourses',38 'studentstudylevels', 'coursetickets',39 'studentpayments', 'bedtickets', 'paymentsoverview',40 'studylevelsoverview', 'combocard', 'bursary')41 35 42 36 def get_students(site, stud_filter=StudentsQuery()): -
main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
r11604 r12104 39 39 CREATED, ADMITTED, CLEARANCE, PAID, REGISTERED, VALIDATED, RETURNING) 40 40 from waeup.kofa.students.accommodation import StudentAccommodation 41 from waeup.kofa.students.export import EXPORTER_NAMES42 41 from waeup.kofa.students.interfaces import ( 43 IStudent, IStudentNavigation, IStudentPersonalEdit, ICSVStudentExporter) 42 IStudent, IStudentNavigation, IStudentPersonalEdit, ICSVStudentExporter, 43 IStudentsUtils) 44 44 from waeup.kofa.students.payments import StudentPaymentsContainer 45 45 from waeup.kofa.students.utils import generate_student_id … … 420 420 (column `del_date`) as a UTC timestamp. 421 421 """ 422 for name in EXPORTER_NAMES: 422 423 STUDENT_EXPORTER_NAMES = getUtility( 424 IStudentsUtils).STUDENT_EXPORTER_NAMES 425 426 for name in STUDENT_EXPORTER_NAMES: 423 427 exporter = getUtility(ICSVStudentExporter, name=name) 424 428 csv_data = exporter.export_student(student) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py
r10059 r12104 31 31 from zope.schema.interfaces import RequiredMissing 32 32 from waeup.kofa.interfaces import IExtFileStore, IFileStoreNameChooser 33 from waeup.kofa.students.export import EXPORTER_NAMES34 33 from waeup.kofa.students.student import ( 35 34 Student, StudentFactory, handle_student_removed, path_from_studid) … … 41 40 IStudent, IStudentStudyCourse, IStudentPaymentsContainer, 42 41 IStudentAccommodation, IStudentStudyLevel, ICourseTicket, IBedTicket, 43 IStudentNavigation )42 IStudentNavigation, IStudentsUtils) 44 43 from waeup.kofa.students.tests.test_batching import StudentImportExportSetup 45 44 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase … … 183 182 184 183 # The student data were put into CSV files 185 for name in EXPORTER_NAMES: 184 STUDENT_EXPORTER_NAMES = getUtility( 185 IStudentsUtils).STUDENT_EXPORTER_NAMES 186 187 for name in STUDENT_EXPORTER_NAMES: 186 188 csv_path = os.path.join(del_dir, '%s.csv' % name) 187 189 self.assertTrue(os.path.isfile(csv_path)) -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r12048 r12104 936 936 PWCHANGE_STATES = (ADMITTED,) 937 937 938 #: A tuple containing all exporter names referring to students or 939 #: subobjects thereof. 940 STUDENT_EXPORTER_NAMES = ('students', 'studentstudycourses', 941 'studentstudylevels', 'coursetickets', 942 'studentpayments', 'bedtickets', 'paymentsoverview', 943 'studylevelsoverview', 'combocard', 'bursary') 944 938 945 #: A prefix used when generating new student ids. Each student id will 939 946 #: start with this string. The default is 'K' for ``Kofa``.
Note: See TracChangeset for help on using the changeset viewer.