Changeset 14443 for main/waeup.kofa/trunk
- Timestamp:
- 23 Jan 2017, 15:58:02 (8 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r14373 r14443 4 4 1.4.2.dev0 (unreleased) 5 5 ======================= 6 7 * Get set of selected students also from list of matric numbers. 8 9 * Confine Level Reports and Session Results Presentations to certificates. 6 10 7 11 * Show report number (job_id) on report pdf slips. -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportselected.pt
r12518 r14443 1 1 <p i18n:translate=""> 2 2 Here you can export student data for a small subset of students by entering 3 a list of student ids. The ids must be separated by whitespaces or commas. 3 a list of student ids or matric numbers. 4 The values must be separated by whitespaces or commas. 4 5 You can also copy and paste parts of Excel or Calc columns. 5 6 </p> -
main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
r14395 r14443 223 223 for id in selected: 224 224 student = students_container.get(id, None) 225 if student: 226 students.append(student) 225 if student is None: 226 # try matric number 227 result = list(StudentsQuery(matric_number=id).query()) 228 if result: 229 student = result[0] 230 else: 231 continue 232 students.append(student) 227 233 return students 228 234 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r14366 r14443 422 422 return 423 423 424 def test_export_selected (self):424 def test_export_selected_student_id(self): 425 425 # we can export a filtered set of students (filtered by session/level) 426 426 self.setup_student(self.student) … … 430 430 exporter.export_selected( 431 431 self.app, self.outfile, selected=['A111111']) 432 result = open(self.outfile, 'rb').read() 433 self.assertEqual( 434 result, 435 'certificate,current_level,current_session,current_verdict,' 436 'entry_mode,entry_session,previous_verdict,student_id\r\n' 437 438 'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n' 439 ) 440 return 441 442 def test_export_selected_matric_number(self): 443 # we can export a filtered set of students (filtered by session/level) 444 self.setup_student(self.student) 445 self.app['students'].addStudent(self.student) 446 notify(grok.ObjectModifiedEvent(self.student)) 447 exporter = StudentStudyCourseExporter() 448 exporter.export_selected( 449 self.app, self.outfile, selected=['234']) 432 450 result = open(self.outfile, 'rb').read() 433 451 self.assertEqual(
Note: See TracChangeset for help on using the changeset viewer.